Skip to content

Commit f01a5a5

Browse files
committed
[Build] Tweak build classes
1 parent d5d91a8 commit f01a5a5

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

buildSrc/scripts/release.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
BASEDIR=$(dirname "$0")
44
cd $BASEDIR/../.. || exit
55

6-
echo > Publishing Modules...
7-
echo >> Module [imgui-app]
6+
echo '> Publishing Modules...'
7+
echo '>> Module [imgui-app]'
88
./gradlew :imgui-app:publishMavenJavaPublicationToMavenCentralRepository
9-
echo >> Module [imgui-lwjgl3]
9+
echo '>> Module [imgui-lwjgl3]'
1010
./gradlew :imgui-lwjgl3:publishMavenJavaPublicationToMavenCentralRepository
11-
echo >> Module [imgui-binding]
11+
echo '>> Module [imgui-binding]'
1212
./gradlew :imgui-binding:publishMavenJavaPublicationToMavenCentralRepository
1313

14-
echo > Publishing Natives...
15-
echo >> Natives: [win & freetype]
14+
echo '> Publishing Natives...'
15+
echo '>> Natives: [win & freetype]'
1616
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=win -Pfreetype=true
17-
echo >> Natives: [win & no freetype]
17+
echo '>> Natives: [win & no freetype]'
1818
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=win -Pfreetype=false
19-
echo >> Natives: [linux & freetype]
19+
echo '>> Natives: [linux & freetype]'
2020
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=true
21-
echo >> Natives: [linux & no freetype]
21+
echo '>> Natives: [linux & no freetype]'
2222
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=false
23-
echo >> Natives: [mac & freetype]
23+
echo '>> Natives: [mac & freetype]'
2424
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=mac -Pfreetype=true
25-
echo >> Natives: [mac & no freetype]
25+
echo '>> Natives: [mac & no freetype]'
2626
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=mac -Pfreetype=false

buildSrc/src/main/groovy/tool/UpVersion.groovy

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
package tool
22

3-
import groovy.transform.CompileStatic
43
import org.gradle.api.DefaultTask
54
import org.gradle.api.tasks.Internal
65
import org.gradle.api.tasks.TaskAction
76

8-
@CompileStatic
97
class UpVersion extends DefaultTask {
108
@Internal
119
String group = 'build'
1210
@Internal
1311
String description = 'Up project version to the next one.'
1412

15-
private final String currentVersion = project.findProperty('version')
16-
private final String nextVersion = project.findProperty('next')
17-
1813
@TaskAction
1914
void up() {
15+
String currentVersion = project.findProperty('version')
16+
String nextVersion = project.findProperty('next')
17+
2018
if (!currentVersion) {
21-
throw new IllegalArgumentException('No property was found: "version"')
19+
throw new IllegalStateException('No property was found: "version"')
2220
}
2321
if (!nextVersion) {
24-
throw new IllegalArgumentException('No property was found: "next"')
22+
throw new IllegalStateException('No property was found: "next"')
2523
}
2624

25+
println "Up project version: $nextVersion..."
26+
27+
println 'Updating gradle.properties...'
2728
def propsFile = project.file('gradle.properties')
2829
propsFile.text = propsFile.text.replace("version=$currentVersion", "version=$nextVersion")
2930

31+
println 'Updating README.md...'
3032
def readmeFile = project.file('README.md')
3133
readmeFile.text = readmeFile.text.replace(currentVersion, nextVersion)
3234
}

buildSrc/src/main/groovy/tool/generator/GenerateLibs.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ class GenerateLibs extends DefaultTask {
3838
println '====================================='
3939

4040
if (!buildEnvs) {
41-
println 'No build targets. Task is cancelled.'
42-
return
41+
throw new IllegalStateException('No build targets')
4342
}
4443

4544
// Generate h/cpp files for JNI

0 commit comments

Comments
 (0)