diff --git a/build.gradle b/build.gradle index f299caa..fb10065 100644 --- a/build.gradle +++ b/build.gradle @@ -24,14 +24,6 @@ plugins { } allprojects { - apply plugin: 'java' - - compileJava { - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - options.encoding = 'UTF-8' - } - repositories { mavenCentral() maven { url 'https://oss.sonatype.org/content/groups/public/' } @@ -39,6 +31,14 @@ allprojects { } subprojects { + apply plugin: 'java' + + compileJava { + sourceCompatibility = 1.8 + targetCompatibility = 1.8 + options.encoding = 'UTF-8' + } + group 'mc' ext { @@ -110,7 +110,7 @@ subprojects { 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))) { (new File(libsDir)).mkdirs() } @@ -127,7 +127,7 @@ subprojects { if (Boolean.valueOf(System.getProperty("createRunScript", "false"))) { def runnerSh = new File(deployDir, "run.sh") 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) { def logImplDir = new File(System.getProperty("logImplDir")) - + if (logImplDir.isAbsolute()) { classpath += files(fileTree(dir: logImplDir)) } else { @@ -160,7 +160,7 @@ task runServer(type: JavaExec) { } else { classpath += files(fileTree(dir: new File(workingDir, "log-impl"))) } - + systemProperties System.properties systemProperties.put("user.dir", workingDir)