mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
avgg
This commit is contained in:
85
build.gradle
85
build.gradle
@@ -1,85 +0,0 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
ext{
|
||||
sdkRoot = System.getenv("ANDROID_HOME")
|
||||
sdkVersion = '30'
|
||||
artifactFilename = "Informatis.jar"
|
||||
}
|
||||
|
||||
group "sharlotte"
|
||||
|
||||
sourceSets.main {
|
||||
java.srcDir("src/")
|
||||
resources.srcDir("assets/")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
annotationProcessor 'com.github.Anuken:jabel:0.8.0'
|
||||
compileOnly "com.github.Anuken.Mindustry:core:v138"
|
||||
compileOnly "com.github.Anuken.Arc:flabel:v138"
|
||||
compileOnly "com.github.Anuken.Arc:arc-core:v138"
|
||||
}
|
||||
|
||||
jar.archiveFileName.set("raw-$artifactFilename")
|
||||
|
||||
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{
|
||||
//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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
from(zipTree(jarArtifact), zipTree(dexedArtifact))
|
||||
}
|
||||
|
||||
task buildDex dependsOn "build", "dexify"
|
||||
|
||||
task buildMove(dependsOn: build) {
|
||||
doLast {
|
||||
copy {
|
||||
from "build/libs/raw-Informatis.jar"
|
||||
into System.getenv("destination")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile){
|
||||
targetCompatibility = 8
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
options.encoding = "UTF-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