forked from rehlds/ReGameDLL_CS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from s1lentq/master
Up
- Loading branch information
Showing
334 changed files
with
101,756 additions
and
101,339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ root = true | |
[*] | ||
indent_style = tab | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
############################################################################### | ||
# Set default behavior to automatically normalize line endings. | ||
############################################################################### | ||
* text=auto | ||
|
||
# Sources | ||
*.c text eol=crlf diff=c | ||
*.cc text eol=crlf diff=cpp | ||
*.cxx text eol=crlf diff=cpp | ||
*.cpp text eol=crlf diff=cpp | ||
*.c++ text eol=crlf diff=cpp | ||
*.hpp text eol=crlf diff=cpp | ||
*.h text eol=crlf diff=c | ||
*.h++ text eol=crlf diff=cpp | ||
*.hh text eol=crlf diff=cpp | ||
|
||
# Scripts | ||
*.sh text eol=lf | ||
gradlew text eol=lf | ||
*.bat text eol=crlf | ||
*.gradle text eol=crlf | ||
*.groovy text eol=crlf | ||
*.def text eol=crlf | ||
*.fgd text eol=crlf | ||
*.cfg text eol=crlf | ||
*.properties text eol=crlf | ||
*.vm text eol=crlf | ||
|
||
# Compiled Object files | ||
*.o binary | ||
*.a binary | ||
*.obj binary | ||
*.lib binary | ||
*.jar binary | ||
|
||
# Resources files | ||
*.spr binary | ||
*.zip binary | ||
*.wad binary | ||
*.bsp binary | ||
*.rmf binary | ||
|
||
# Project files | ||
*.sln text eol=crlf | ||
*.vcxproj text eol=crlf | ||
*.vcxproj.filters text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
import versioning.GitVersioner | ||
import versioning.RegamedllVersionInfo | ||
import org.joda.time.DateTime | ||
|
||
apply plugin: 'maven-publish' | ||
apply from: 'shared.gradle' | ||
group = 'regamedll' | ||
|
||
apply plugin: 'idea' | ||
|
||
idea { | ||
project { | ||
languageLevel = 'JDK_1_7' | ||
} | ||
} | ||
|
||
def gitInfo = GitVersioner.versionForDir(project.rootDir) | ||
RegamedllVersionInfo versionInfo | ||
if (gitInfo && gitInfo.tag && gitInfo.tag[0] == 'v') { | ||
def m = gitInfo.tag =~ /^v(\d+)\.(\d+)(\.(\d+))?$/ | ||
if (!m.find()) { | ||
throw new RuntimeException("Invalid git version tag name ${gitInfo.tag}") | ||
} | ||
|
||
versionInfo = new RegamedllVersionInfo( | ||
majorVersion: m.group(1) as int, | ||
minorVersion: m.group(2) as int, | ||
maintenanceVersion: m.group(4) ? (m.group(4) as int) : null, | ||
localChanges: gitInfo.localChanges, | ||
commitDate: gitInfo.commitDate, | ||
commitSHA: gitInfo.commitSHA, | ||
commitURL: gitInfo.commitURL | ||
) | ||
} else { | ||
versionInfo = new RegamedllVersionInfo( | ||
majorVersion: project.majorVersion as int, | ||
minorVersion: project.minorVersion as int, | ||
maintenanceVersion: project.maintenanceVersion as int, | ||
suffix: 'dev', | ||
localChanges: gitInfo ? gitInfo.localChanges : true, | ||
commitDate: gitInfo ? gitInfo.commitDate : new DateTime(), | ||
commitSHA: gitInfo ? gitInfo.commitSHA : "", | ||
commitURL: gitInfo ? gitInfo.commitURL : "", | ||
commitCount: gitInfo ? (gitInfo.commitCount as int) : null | ||
) | ||
} | ||
|
||
project.ext.regamedllVersionInfo = versionInfo | ||
project.version = versionInfo.asMavenVersion() | ||
|
||
apply from: 'publish.gradle' | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '2.4' | ||
} | ||
import versioning.GitVersioner | ||
import versioning.RegamedllVersionInfo | ||
import org.joda.time.DateTime | ||
|
||
apply plugin: 'maven-publish' | ||
apply from: 'shared.gradle' | ||
group = 'regamedll' | ||
|
||
apply plugin: 'idea' | ||
|
||
idea { | ||
project { | ||
languageLevel = 'JDK_1_7' | ||
} | ||
} | ||
|
||
def gitInfo = GitVersioner.versionForDir(project.rootDir) | ||
RegamedllVersionInfo versionInfo | ||
if (gitInfo && gitInfo.tag && gitInfo.tag[0] == 'v') { | ||
def m = gitInfo.tag =~ /^v(\d+)\.(\d+)(\.(\d+))?$/ | ||
if (!m.find()) { | ||
throw new RuntimeException("Invalid git version tag name ${gitInfo.tag}") | ||
} | ||
|
||
versionInfo = new RegamedllVersionInfo( | ||
majorVersion: m.group(1) as int, | ||
minorVersion: m.group(2) as int, | ||
maintenanceVersion: m.group(4) ? (m.group(4) as int) : null, | ||
localChanges: gitInfo.localChanges, | ||
commitDate: gitInfo.commitDate, | ||
commitSHA: gitInfo.commitSHA, | ||
commitURL: gitInfo.commitURL | ||
) | ||
} else { | ||
versionInfo = new RegamedllVersionInfo( | ||
majorVersion: project.majorVersion as int, | ||
minorVersion: project.minorVersion as int, | ||
maintenanceVersion: project.maintenanceVersion as int, | ||
suffix: 'dev', | ||
localChanges: gitInfo ? gitInfo.localChanges : true, | ||
commitDate: gitInfo ? gitInfo.commitDate : new DateTime(), | ||
commitSHA: gitInfo ? gitInfo.commitSHA : "", | ||
commitURL: gitInfo ? gitInfo.commitURL : "", | ||
commitCount: gitInfo ? (gitInfo.commitCount as int) : null | ||
) | ||
} | ||
|
||
project.ext.regamedllVersionInfo = versionInfo | ||
project.version = versionInfo.asMavenVersion() | ||
|
||
apply from: 'publish.gradle' | ||
|
||
task wrapper(type: Wrapper) { | ||
gradleVersion = '2.4' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
apply plugin: 'groovy' | ||
|
||
repositories { | ||
//mavenLocal() | ||
mavenCentral() | ||
maven { | ||
url 'http://nexus.rehlds.org/nexus/content/repositories/regamedll-releases/' | ||
} | ||
maven { | ||
url 'http://nexus.rehlds.org/nexus/content/repositories/regamedll-snapshots/' | ||
} | ||
maven { | ||
url 'http://nexus.rehlds.org/nexus/content/repositories/regamedll-dev/' | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
compile gradleApi() | ||
compile localGroovy() | ||
compile 'commons-io:commons-io:2.4' | ||
compile 'commons-lang:commons-lang:2.6' | ||
compile 'joda-time:joda-time:2.7' | ||
|
||
compile 'org.doomedsociety.gradlecpp:gradle-cpp-plugin:1.2' | ||
compile 'org.eclipse.jgit:org.eclipse.jgit:3.7.0.201502260915-r' | ||
|
||
compile 'org.apache.commons:commons-compress:1.9' | ||
compile 'org.apache.ant:ant-compress:1.2' | ||
compile 'org.apache.ant:ant:1.9.6' | ||
|
||
compile 'org.apache.velocity:velocity:1.7' | ||
} | ||
apply plugin: 'groovy' | ||
|
||
repositories { | ||
//mavenLocal() | ||
mavenCentral() | ||
maven { | ||
url 'http://nexus.rehlds.org/nexus/content/repositories/regamedll-releases/' | ||
} | ||
maven { | ||
url 'http://nexus.rehlds.org/nexus/content/repositories/regamedll-snapshots/' | ||
} | ||
maven { | ||
url 'http://nexus.rehlds.org/nexus/content/repositories/regamedll-dev/' | ||
} | ||
|
||
} | ||
|
||
dependencies { | ||
compile gradleApi() | ||
compile localGroovy() | ||
compile 'commons-io:commons-io:2.4' | ||
compile 'commons-lang:commons-lang:2.6' | ||
compile 'joda-time:joda-time:2.7' | ||
|
||
compile 'org.doomedsociety.gradlecpp:gradle-cpp-plugin:1.2' | ||
compile 'org.eclipse.jgit:org.eclipse.jgit:3.7.0.201502260915-r' | ||
|
||
compile 'org.apache.commons:commons-compress:1.9' | ||
compile 'org.apache.ant:ant-compress:1.2' | ||
compile 'org.apache.ant:ant:1.9.6' | ||
|
||
compile 'org.apache.velocity:velocity:1.7' | ||
} |
116 changes: 58 additions & 58 deletions
116
buildSrc/src/main/groovy/dirsync/builder/FileSystemTreeBuilder.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,58 @@ | ||
package dirsync.builder | ||
|
||
import dirsync.model.tree.DirectoryNode | ||
import dirsync.model.tree.FileNode | ||
import groovy.transform.CompileStatic | ||
|
||
class FileSystemTreeBuilder { | ||
|
||
@CompileStatic | ||
private static FileNode<File> buildNodeForFile(File file, DirectoryNode<File> parent) { | ||
if (parent.getChildren(file.name)) { | ||
throw new RuntimeException("Parent dir ${parent.name} already contains child node ${file.name}"); | ||
} | ||
|
||
return new FileNode( | ||
name: file.name, | ||
lastModifiedDate: file.lastModified(), | ||
data: file, | ||
parent: parent, | ||
size: file.size() | ||
); | ||
} | ||
|
||
@CompileStatic | ||
private static DirectoryNode<File> buildNodeForDirectoryRecursive(File dir, DirectoryNode<File> parent) { | ||
if (!dir.isDirectory()) { | ||
throw new RuntimeException("File ${dir.absolutePath} is not a directory") | ||
} | ||
|
||
if (parent != null && parent.getChildren(dir.name)) { | ||
throw new RuntimeException("Parent dir ${parent.name} already contains child node ${dir.name}"); | ||
} | ||
|
||
DirectoryNode<File> thisNode = new DirectoryNode( | ||
name: dir.name, | ||
lastModifiedDate: dir.lastModified(), | ||
data: dir, | ||
parent: parent | ||
); | ||
|
||
dir.eachFile { File f -> | ||
if (f.isDirectory()) { | ||
thisNode.childNodes[f.name] = buildNodeForDirectoryRecursive(f, thisNode) | ||
} else { | ||
thisNode.childNodes[f.name] = buildNodeForFile(f, thisNode) | ||
} | ||
} | ||
|
||
return thisNode; | ||
} | ||
|
||
static DirectoryNode<File> buildFileSystemTree(File rootDir) { | ||
def root = buildNodeForDirectoryRecursive(rootDir, null); | ||
PostBuildPass.doPostBuild(root) | ||
|
||
return root | ||
} | ||
} | ||
package dirsync.builder | ||
|
||
import dirsync.model.tree.DirectoryNode | ||
import dirsync.model.tree.FileNode | ||
import groovy.transform.CompileStatic | ||
|
||
class FileSystemTreeBuilder { | ||
|
||
@CompileStatic | ||
private static FileNode<File> buildNodeForFile(File file, DirectoryNode<File> parent) { | ||
if (parent.getChildren(file.name)) { | ||
throw new RuntimeException("Parent dir ${parent.name} already contains child node ${file.name}"); | ||
} | ||
|
||
return new FileNode( | ||
name: file.name, | ||
lastModifiedDate: file.lastModified(), | ||
data: file, | ||
parent: parent, | ||
size: file.size() | ||
); | ||
} | ||
|
||
@CompileStatic | ||
private static DirectoryNode<File> buildNodeForDirectoryRecursive(File dir, DirectoryNode<File> parent) { | ||
if (!dir.isDirectory()) { | ||
throw new RuntimeException("File ${dir.absolutePath} is not a directory") | ||
} | ||
|
||
if (parent != null && parent.getChildren(dir.name)) { | ||
throw new RuntimeException("Parent dir ${parent.name} already contains child node ${dir.name}"); | ||
} | ||
|
||
DirectoryNode<File> thisNode = new DirectoryNode( | ||
name: dir.name, | ||
lastModifiedDate: dir.lastModified(), | ||
data: dir, | ||
parent: parent | ||
); | ||
|
||
dir.eachFile { File f -> | ||
if (f.isDirectory()) { | ||
thisNode.childNodes[f.name] = buildNodeForDirectoryRecursive(f, thisNode) | ||
} else { | ||
thisNode.childNodes[f.name] = buildNodeForFile(f, thisNode) | ||
} | ||
} | ||
|
||
return thisNode; | ||
} | ||
|
||
static DirectoryNode<File> buildFileSystemTree(File rootDir) { | ||
def root = buildNodeForDirectoryRecursive(rootDir, null); | ||
PostBuildPass.doPostBuild(root) | ||
|
||
return root | ||
} | ||
} |
Oops, something went wrong.