New gradle scripts to modularize the build process

This commit is contained in:
Pazaz 2022-04-20 21:50:21 -04:00
parent b3fd9e76cf
commit bc7ecce61c
8 changed files with 82 additions and 56 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
.idea/ .idea/
.gradle/ .gradle/
.vscode/
bin/ bin/
build/ build/

View file

@ -1,50 +0,0 @@
plugins {
id 'java'
id 'application'
}
mainClassName = 'client'
version = '1.0.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
sourceSets {
main {
java {
srcDirs 'client'
srcDirs 'deob-annotations'
srcDirs 'signlink'
}
}
}
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
implementation files(
'lib/gluegen-rt.jar', 'lib/gluegen-rt-natives-windows-i586.jar', 'lib/gluegen-rt-natives-windows-amd64.jar', 'lib/gluegen-rt-natives-macosx-universal.jar', 'lib/gluegen-rt-natives-linux-i586.jar', 'lib/gluegen-rt-natives-linux-amd64.jar'
)
implementation files(
'lib/jogl-all.jar', 'lib/jogl-all-natives-windows-i586.jar', 'lib/jogl-all-natives-windows-amd64.jar', 'lib/jogl-all-natives-macosx-universal.jar', 'lib/jogl-all-natives-linux-i586.jar', 'lib/jogl-all-natives-linux-amd64.jar'
)
}
jar {
manifest {
attributes 'Main-Class': 'client'
}
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}

42
client/build.gradle Normal file
View file

@ -0,0 +1,42 @@
plugins {
id 'java'
id 'application'
}
mainClassName = 'client'
version = '1.0.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
compileOnly project(':deob-annotations')
implementation project(':signlink')
implementation 'lib:gluegen-rt'
implementation 'lib:gluegen-rt-natives-windows-amd64'
implementation 'lib:gluegen-rt-natives-windows-i586'
implementation 'lib:gluegen-rt-natives-linux-amd64'
implementation 'lib:gluegen-rt-natives-linux-i586'
implementation 'lib:gluegen-rt-natives-macosx-universal'
implementation 'lib:jogl-all'
implementation 'lib:jogl-all-natives-windows-amd64'
implementation 'lib:jogl-all-natives-windows-i586'
implementation 'lib:jogl-all-natives-linux-amd64'
implementation 'lib:jogl-all-natives-linux-i586'
implementation 'lib:jogl-all-natives-macosx-universal'
}
jar {
manifest {
attributes 'Main-Class': "$mainClassName"
}
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
}

View file

@ -0,0 +1,9 @@
plugins {
id 'java'
id 'java-library'
}
version = '0.1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8

16
settings.gradle Normal file
View file

@ -0,0 +1,16 @@
rootProject.name = "rt4-client"
dependencyResolutionManagement {
repositories {
mavenCentral()
flatDir {
dirs 'lib'
}
}
}
include(
"deob-annotations",
"signlink",
"client"
)

14
signlink/build.gradle Normal file
View file

@ -0,0 +1,14 @@
plugins {
id 'java'
id 'java-library'
}
version = '1.0.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compileOnly project(':deob-annotations')
compileOnly 'lib:jogl-all'
}

View file

@ -1,3 +0,0 @@
@echo off
call .\gradlew.bat build
java -jar .\build\libs\RT4-Client-1.0.0.jar 1 live english game0

View file

@ -1,3 +0,0 @@
#!/bin/sh
./gradlew build
java -jar ./build/libs/RT4-Client-1.0.0.jar 1 live english game0