Archived
0

gradle: правка сборки

(cherry picked from commit 0dddfc39cf)
This commit is contained in:
2019-01-29 16:33:58 +03:00
parent 3e9a86e97f
commit b3fd91c614

View File

@@ -24,14 +24,6 @@ plugins {
} }
allprojects { allprojects {
apply plugin: 'java'
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
repositories { repositories {
mavenCentral() mavenCentral()
maven { url 'https://oss.sonatype.org/content/groups/public/' } maven { url 'https://oss.sonatype.org/content/groups/public/' }
@@ -39,6 +31,14 @@ allprojects {
} }
subprojects { subprojects {
apply plugin: 'java'
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
group 'mc' group 'mc'
ext { ext {
@@ -110,7 +110,7 @@ subprojects {
Files.copy(jar.archivePath.toPath(), target) Files.copy(jar.archivePath.toPath(), target)
} }
def libsDir = System.getProperty("libs", deployDir+File.separator+"libs") def libsDir = System.getProperty("libs", deployDir + File.separator + "libs")
if (Files.notExists(Paths.get(libsDir))) { if (Files.notExists(Paths.get(libsDir))) {
(new File(libsDir)).mkdirs() (new File(libsDir)).mkdirs()
} }
@@ -127,7 +127,7 @@ subprojects {
if (Boolean.valueOf(System.getProperty("createRunScript", "false"))) { if (Boolean.valueOf(System.getProperty("createRunScript", "false"))) {
def runnerSh = new File(deployDir, "run.sh") def runnerSh = new File(deployDir, "run.sh")
runnerSh.write "java -cp \"${project(':core').jar.archiveName};" runnerSh.write "java -cp \"${project(':core').jar.archiveName};"
runnerSh << "./libs/*;./log-impl/*\" mc.core.Main\n" runnerSh << "${libsDir}/*;./log-impl/*\" mc.core.Main\n"
} }
} }
} }
@@ -151,7 +151,7 @@ task runServer(type: JavaExec) {
if (System.getProperty("logImplDir") != null) { if (System.getProperty("logImplDir") != null) {
def logImplDir = new File(System.getProperty("logImplDir")) def logImplDir = new File(System.getProperty("logImplDir"))
if (logImplDir.isAbsolute()) { if (logImplDir.isAbsolute()) {
classpath += files(fileTree(dir: logImplDir)) classpath += files(fileTree(dir: logImplDir))
} else { } else {