[Build] Tweak build classes

This commit is contained in:
SpaiR committed 2022-04-17 22:57:06 +03:00
1 parent d5d91a896f
commit f01a5a573d
3 files changed
+21 -20

No files matched your search

+11 -11
View File
@@ -3,24 +3,24 @@
BASEDIR=$(dirname "$0")
cd $BASEDIR/../.. || exit
echo > Publishing Modules...
echo >> Module [imgui-app]
echo '> Publishing Modules...'
echo '>> Module [imgui-app]'
./gradlew :imgui-app:publishMavenJavaPublicationToMavenCentralRepository
echo >> Module [imgui-lwjgl3]
echo '>> Module [imgui-lwjgl3]'
./gradlew :imgui-lwjgl3:publishMavenJavaPublicationToMavenCentralRepository
echo >> Module [imgui-binding]
echo '>> Module [imgui-binding]'
./gradlew :imgui-binding:publishMavenJavaPublicationToMavenCentralRepository
echo > Publishing Natives...
echo >> Natives: [win & freetype]
echo '> Publishing Natives...'
echo '>> Natives: [win & freetype]'
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=win -Pfreetype=true
echo >> Natives: [win & no freetype]
echo '>> Natives: [win & no freetype]'
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=win -Pfreetype=false
echo >> Natives: [linux & freetype]
echo '>> Natives: [linux & freetype]'
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=true
echo >> Natives: [linux & no freetype]
echo '>> Natives: [linux & no freetype]'
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=linux -Pfreetype=false
echo >> Natives: [mac & freetype]
echo '>> Natives: [mac & freetype]'
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=mac -Pfreetype=true
echo >> Natives: [mac & no freetype]
echo '>> Natives: [mac & no freetype]'
./gradlew :imgui-binding-natives:publishMavenJavaPublicationToMavenCentralRepository -PdeployType=mac -Pfreetype=false
@@ -1,32 +1,34 @@
package tool
import groovy.transform.CompileStatic
import org.gradle.api.DefaultTask
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.TaskAction
@CompileStatic
class UpVersion extends DefaultTask {
@Internal
String group = 'build'
@Internal
String description = 'Up project version to the next one.'
private final String currentVersion = project.findProperty('version')
private final String nextVersion = project.findProperty('next')
@TaskAction
void up() {
String currentVersion = project.findProperty('version')
String nextVersion = project.findProperty('next')
if (!currentVersion) {
throw new IllegalArgumentException('No property was found: "version"')
throw new IllegalStateException('No property was found: "version"')
}
if (!nextVersion) {
throw new IllegalArgumentException('No property was found: "next"')
throw new IllegalStateException('No property was found: "next"')
}
println "Up project version: $nextVersion..."
println 'Updating gradle.properties...'
def propsFile = project.file('gradle.properties')
propsFile.text = propsFile.text.replace("version=$currentVersion", "version=$nextVersion")
println 'Updating README.md...'
def readmeFile = project.file('README.md')
readmeFile.text = readmeFile.text.replace(currentVersion, nextVersion)
}
@@ -38,8 +38,7 @@ class GenerateLibs extends DefaultTask {
println '====================================='
if (!buildEnvs) {
println 'No build targets. Task is cancelled.'
return
throw new IllegalStateException('No build targets')
}
// Generate h/cpp files for JNI