Skip to content

Commit b238647

Browse files
committed
Upgrade gradle + robovm + android plugin
1 parent a43c186 commit b238647

File tree

11 files changed

+56
-70
lines changed

11 files changed

+56
-70
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Java CI
1+
name: Run Gradle build on push
22

33
on: [push]
44

@@ -12,5 +12,20 @@ jobs:
1212
uses: actions/setup-java@v1
1313
with:
1414
java-version: 1.8
15+
- name: Cache Gradle packages
16+
uses: actions/cache@v2
17+
with:
18+
path: |
19+
~/.gradle/caches
20+
~/.gradle/wrapper
21+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
22+
restore-keys: |
23+
${{ runner.os }}-gradle-
1524
- name: Build with Gradle
16-
run: ./gradlew build
25+
run: ./gradlew build
26+
- name: Cleanup Gradle Cache
27+
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
28+
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
29+
run: |
30+
rm -f ~/.gradle/caches/modules-2/modules-2.lock
31+
rm -f ~/.gradle/caches/modules-2/gc.properties

.github/workflows/gradle-build-push.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

adventure-editor/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ task setVersion(type: WriteProperties) {
9090
}
9191
}
9292

93-
processResources.finalizedBy(setVersion)
93+
processResources.dependsOn 'setVersion'
9494

9595
// Run `gradle pack` task to generate editor atlases
9696
import com.badlogic.gdx.tools.texturepacker.TexturePacker

adventure-editor/src/main/resources/projectTmpl/android/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ tasks.matching { it.name.contains("merge") && it.name.contains("JniLibFolders")
135135
packageTask.dependsOn 'copyAndroidNatives'
136136
}
137137

138+
build.dependsOn ':core:setVersion'
139+
138140
task run(type: Exec) {
139141
def path = getSdkFolder()
140142

adventure-editor/src/main/resources/projectTmpl/core/build.gradle

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,40 @@ apply plugin: 'java'
22
apply plugin: 'java-library'
33

44
sourceCompatibility = 1.8
5-
targetCompatibility=1.8
5+
targetCompatibility = 1.8
66

77
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
88

99
dependencies {
10-
api "com.badlogicgames.gdx:gdx:$gdxVersion"
11-
api "com.bladecoder.engine:blade-engine:$bladeEngineVersion"
12-
implementation "com.bladecoder.ink:blade-ink:$bladeInkVersion"
13-
implementation "org.minimalcode:minimalcode-beans:0.5.1"
14-
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
15-
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion"
16-
17-
18-
if(project.hasProperty("spinePlugin") && project.spinePlugin.equals("true")) {
19-
println "Using Spine Plugin..."
20-
implementation "com.bladecoder.engine:blade-engine-spine-plugin:$bladeEngineVersion"
21-
}
10+
api "com.badlogicgames.gdx:gdx:$gdxVersion"
11+
api "com.bladecoder.engine:blade-engine:$bladeEngineVersion"
12+
implementation "com.bladecoder.ink:blade-ink:$bladeInkVersion"
13+
implementation "org.minimalcode:minimalcode-beans:0.5.1"
14+
implementation "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
15+
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-core:$gdxControllersVersion"
16+
17+
18+
if (project.hasProperty("spinePlugin") && project.spinePlugin.equals("true")) {
19+
println "Using Spine Plugin..."
20+
implementation "com.bladecoder.engine:blade-engine-spine-plugin:$bladeEngineVersion"
21+
}
2222
}
2323

2424

2525
task setVersion(type: WriteProperties) {
26-
def props = new Properties()
27-
def propFile = project.file("../assets/BladeEngine.properties");
28-
props.load(new FileReader(propFile))
26+
def props = new Properties()
27+
def propFile = project.file("../assets/BladeEngine.properties");
28+
props.load(new FileReader(propFile))
2929

3030
props."version" = version
31-
props."bladeEngineVersion" = bladeEngineVersion
32-
props."gdxVersion" = gdxVersion
33-
props."roboVMVersion" = roboVMVersion
34-
35-
setProperties(props);
36-
setOutputFile(propFile);
37-
38-
doLast {
39-
println "Set version info in versions.properties"
40-
}
41-
}
31+
props."bladeEngineVersion" = bladeEngineVersion
32+
props."gdxVersion" = gdxVersion
33+
props."roboVMVersion" = roboVMVersion
34+
35+
setProperties(props);
36+
setOutputFile(propFile);
4237

43-
processResources.finalizedBy(setVersion)
38+
doLast {
39+
println "Set version info in versions.properties"
40+
}
41+
}

adventure-editor/src/main/resources/projectTmpl/desktop/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ task dist(type: Jar) {
4747

4848
dist.dependsOn classes
4949
dist.dependsOn ':core:jar'
50+
processResources.dependsOn ':core:setVersion'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

adventure-editor/src/main/resources/projectTmpl/ios/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ launchIPhoneSimulator.dependsOn build
2222
launchIPadSimulator.dependsOn build
2323
launchIOSDevice.dependsOn build
2424
createIPA.dependsOn build
25+
processResources.dependsOn ':core:setVersion'
2526

2627
robovm {
2728
archs = "arm64"
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
androidAPILevel=33
2-
androidGradlePluginVersion=7.2.2
2+
androidGradlePluginVersion=8.1.0
33
bladeInkVersion=1.1.2
44
libgdxVersion=1.12.0
5-
roboVMVersion=2.3.19
6-
version=4.2.0
5+
roboVMVersion=2.3.20
6+
version=4.2.1-SNAPSHOT

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
version=4.2.0
1+
version=4.2.1-SNAPSHOT
22
libgdxVersion=1.12.0
3-
roboVMVersion=2.3.19
3+
roboVMVersion=2.3.20
44
androidAPILevel=33
5-
androidGradlePluginVersion=7.3.1
5+
androidGradlePluginVersion=8.1.0
66
bladeInkVersion=1.1.2
77
gdxControllersVersion=2.2.3
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)