update gradle build src for capability with IDEA

This commit is contained in:
A.C.Sukazyo Eyre 2023-10-12 14:39:18 +08:00
parent b305f52493
commit 1b3a847fc8
Signed by: Eyre_S
GPG Key ID: C17CE40291207874
2 changed files with 18 additions and 4 deletions

View File

@ -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 {

View File

@ -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