mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
update gradle, fixed overflow in wave display
This commit is contained in:
74
build.gradle
74
build.gradle
@@ -2,8 +2,13 @@ plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group pGroup
|
||||
version '1.0'
|
||||
ext{
|
||||
sdkRoot = System.getenv("ANDROID_HOME")
|
||||
sdkVersion = '30'
|
||||
artifactFilename = "Informatis.jar"
|
||||
}
|
||||
|
||||
group "sharlotte"
|
||||
|
||||
sourceSets.main {
|
||||
java.srcDir("src/")
|
||||
@@ -15,37 +20,41 @@ repositories {
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
|
||||
jar {
|
||||
archiveFileName.set pArtifactFilename
|
||||
|
||||
from {
|
||||
configurations.runtimeClasspath.collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
annotationProcessor 'com.github.Anuken:jabel:34e4c172e65b3928cd9eabe1993654ea79c409cd'
|
||||
compileOnly "com.github.Anuken.MindustryJitpack:core:3ffa59efb6"
|
||||
annotationProcessor 'com.github.Anuken:jabel:0.8.0'
|
||||
compileOnly "com.github.Anuken.Mindustry:core:v137"
|
||||
compileOnly "com.github.Anuken.Arc:arc-core:dfcb21ce56"
|
||||
}
|
||||
|
||||
task dexify(type: Jar) {
|
||||
archiveName "dexed-$pArtifactFilename"
|
||||
jar.archiveFileName.set("raw-$artifactFilename")
|
||||
|
||||
final File jarArtifact = new File(tasks.jar.archiveFile.get().asFile.parent, pArtifactFilename),
|
||||
def isWindows = System.getProperty("os.name").toLowerCase(Locale.ROOT).contains("windows")
|
||||
|
||||
task dexify(type: Jar){
|
||||
archiveFileName.set(artifactFilename)
|
||||
|
||||
final File jarArtifact = new File(tasks.jar.archiveFile.get().asFile.parent, "raw-$artifactFilename"),
|
||||
dexedArtifact = new File(tasks.dexify.getTemporaryDir(), "dexed.jar")
|
||||
doFirst {
|
||||
exec {
|
||||
workingDir dexedArtifact.parent
|
||||
def command = ["d8", "--min-api", pMinApi, "--output", dexedArtifact, jarArtifact]
|
||||
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows'))
|
||||
commandLine("cmd", "/c", *command)
|
||||
else
|
||||
commandLine(*command)
|
||||
|
||||
doFirst{
|
||||
//collect dependencies needed for desugaring
|
||||
def files = (configurations.compileClasspath.asList() + configurations.runtimeClasspath.asList() + [new File("$sdkRoot/platforms/android-$sdkVersion/android.jar")])
|
||||
|
||||
exec{
|
||||
workingDir dexedArtifact.parent
|
||||
def command = ["d8", "--min-api", "14"]
|
||||
for(def file : files){
|
||||
command += "--classpath"
|
||||
command += file.path
|
||||
}
|
||||
|
||||
command += ["--output", dexedArtifact, jarArtifact]
|
||||
|
||||
if(isWindows){
|
||||
commandLine("cmd", "/c", *command)
|
||||
}else{
|
||||
commandLine(*command)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +66,7 @@ task buildDex dependsOn "build", "dexify"
|
||||
task buildMove(dependsOn: build) {
|
||||
doLast {
|
||||
copy {
|
||||
from "build/libs/Informatis.jar"
|
||||
from "build/libs/raw-Informatis.jar"
|
||||
into System.getenv("destination")
|
||||
}
|
||||
}
|
||||
@@ -65,12 +74,11 @@ task buildMove(dependsOn: build) {
|
||||
|
||||
tasks.withType(JavaCompile){
|
||||
targetCompatibility = 8
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
options.encoding = "UTF-8"
|
||||
options.forkOptions.jvmArgs.addAll([
|
||||
'--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
|
||||
'--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED'
|
||||
])
|
||||
options.compilerArgs.addAll(['--release', '8'])
|
||||
options.compilerArgs += ["-Xlint:deprecation"]
|
||||
if(JavaVersion.current() != JavaVersion.VERSION_1_8){
|
||||
options.compilerArgs.addAll(['--release', '8'])
|
||||
}
|
||||
compileJava.options.fork = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user