From 1b3a847fc81e630e4638d5fbacb43f81af0ac0fd Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Thu, 12 Oct 2023 14:39:18 +0800 Subject: [PATCH] update gradle build src for capability with IDEA --- build.gradle | 20 +++++++++++++++++--- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index e22d4d9..a14668f 100644 --- a/build.gradle +++ b/build.gradle @@ -96,6 +96,20 @@ java { withSourcesJar() } +sourceSets { + + main { + java { destinationDirectory.set file("build/classes/main") } + scala { destinationDirectory.set file("build/classes/main") } + } + + test { + java { destinationDirectory.set file("build/classes/test") } + scala { destinationDirectory.set file("build/classes/test") } + } + +} + tasks.withType(JavaCompile).configureEach { sourceCompatibility proj_java.getMajorVersion() @@ -110,11 +124,11 @@ tasks.withType(ScalaCompile).configureEach { sourceCompatibility proj_java.getMajorVersion() targetCompatibility proj_java.getMajorVersion() - options.encoding = proj_file_encoding.name() - scalaCompileOptions.encoding = proj_file_encoding.name() - scalaCompileOptions.additionalParameters.add "-language:postfixOps" + scalaCompileOptions.encoding = proj_file_encoding.name() + options.encoding = proj_file_encoding.name() + } tasks.withType(Javadoc).configureEach { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index db9a6b8..fce403e 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists