- добавлен запуск скомпилированных модов - основа для запуска java модов(ещё не готово)
64 lines
1.7 KiB
Groovy
64 lines
1.7 KiB
Groovy
apply plugin: 'java'
|
|
apply plugin: 'application'
|
|
|
|
group 'com.reider745'
|
|
version '1.0-SNAPSHOT'
|
|
mainClassName = 'com.reider745.Main'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// https://mvnrepository.com/artifact/com.google.code.gson/gson
|
|
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
|
|
|
|
// https://mvnrepository.com/artifact/org.mozilla/rhino
|
|
implementation group: 'org.mozilla', name: 'rhino', version: '1.7.8'
|
|
|
|
implementation fileTree (dir: 'iclibs', include: ['*.jar'])
|
|
implementation fileTree (dir: 'iclibs/dex2jar', include: ['*.jar'])
|
|
implementation 'org.json:json:20231013'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
def targetJavaVersion = 17
|
|
java {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
if (JavaVersion.current() < javaVersion) {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
|
|
withSourcesJar()
|
|
}
|
|
|
|
jar {
|
|
duplicatesStrategy = 'exclude'
|
|
manifest {
|
|
attributes 'Main-Class': mainClassName
|
|
}
|
|
from configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
|
|
run {
|
|
workingDir = 'target'
|
|
standardInput = System.in
|
|
}
|
|
|
|
task rebuildAndroidStubs(type: JavaExec, dependsOn: classes) {
|
|
javaLauncher = javaToolchains.launcherFor {
|
|
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
|
if (JavaVersion.current() < javaVersion) {
|
|
languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
|
}
|
|
}
|
|
|
|
classpath = sourceSets.main.runtimeClasspath
|
|
mainClass = 'com.reider745.api.hooks.RebuildJavadoc'
|
|
}
|