Archived
0

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

This commit is contained in:
2019-01-29 15:33:53 +03:00
parent 2d4104fa12
commit 0dddfc39cf

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 {
@@ -160,7 +160,7 @@ task runServer(type: JavaExec) {
} else { } else {
classpath += files(fileTree(dir: new File(workingDir, "log-impl"))) classpath += files(fileTree(dir: new File(workingDir, "log-impl")))
} }
systemProperties System.properties systemProperties System.properties
systemProperties.put("user.dir", workingDir) systemProperties.put("user.dir", workingDir)