From 0dddfc39cf42149b6e4e053dac50094bfc8d4320 Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Tue, 29 Jan 2019 15:33:53 +0300 Subject: [PATCH] =?UTF-8?q?gradle:=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0?= =?UTF-8?q?=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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)