Update build.gradle

This commit is contained in:
MaxKey
2024-10-23 07:34:11 +08:00
parent 62f36631ff
commit e93a06c647
+7 -10
View File
@@ -29,6 +29,12 @@ configurations.all {
transitive = false// 为本依赖关闭依赖传递特性 transitive = false// 为本依赖关闭依赖传递特性
} }
println "Run with Java version [ " + JavaVersion.VERSION_17 + " ] . Your Java version is [ " + JavaVersion.current() + " ]"
if (JavaVersion.current() < JavaVersion.VERSION_17) {
throw new GradleException("This build must be run with Java version [ " + JavaVersion.VERSION_17 + " ] or greater. Your Java version is [ " + JavaVersion.current() + " ]")
}
//add support for Java //add support for Java
//apply plugin: 'java' //apply plugin: 'java'
allprojects { allprojects {
@@ -60,6 +66,7 @@ allprojects {
prefs.append('encoding/<project>=UTF-8') //use UTF-8 prefs.append('encoding/<project>=UTF-8') //use UTF-8
} }
} }
} }
buildscript { buildscript {
@@ -80,16 +87,6 @@ repositories {
subprojects { subprojects {
/*
eclipse {
第一次时请注释这段eclipse设置,可能报错,设置工程字符集
jdt {
File f = file('.settings/org.eclipse.core.resources.prefs')
f.write('eclipse.preferences.version=1\n')
f.append('encoding/<project>=UTF-8') //use UTF-8
}
}
*/
processResources { processResources {
from ('src/main/resources') { from ('src/main/resources') {
include 'src/main/resources/*.*' include 'src/main/resources/*.*'