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