* [Build] CI refactor * [Build] Fix GenerateLibs * [Build] Up actions/checkout@v3 * [Build] Remove actions/gradle-build-action * [Build] Uncomment publish/release jobs * [Build] Delete obsolete jobs * [Build] Add more info to the jar manifest * [Build] Make checkout to fetch tags * [Build] Return job to update binaries * [Doc] Update README
54 lines
1.5 KiB
Groovy
54 lines
1.5 KiB
Groovy
import java.text.SimpleDateFormat
|
|
|
|
ext {
|
|
lwjglVersion = '3.3.1'
|
|
}
|
|
|
|
allprojects {
|
|
group 'imgui-java'
|
|
version 'git describe --tags --always'.execute().text.trim().substring(1)
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
tasks.withType(JavaCompile).tap {
|
|
configureEach {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
tasks.withType(Jar).tap {
|
|
configureEach {
|
|
from(project.rootDir) {
|
|
include 'LICENSE'
|
|
}
|
|
|
|
manifest {
|
|
attributes (
|
|
'Implementation-Title': project.name,
|
|
'Implementation-Version': project.version,
|
|
'Build-Timestamp': new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(System.currentTimeMillis()),
|
|
'Build-Revision': 'git rev-parse HEAD'.execute().text.trim(),
|
|
'Build-Jdk': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})",
|
|
'Created-By': "Gradle ${gradle.gradleVersion}"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.register('buildAll') { t ->
|
|
t.group = 'build'
|
|
t.description = 'Build all project sources.'
|
|
|
|
t.dependsOn ':imgui-app:shadowJar'
|
|
|
|
['app', 'binding', 'lwjgl3'].each { module ->
|
|
['build', 'sourcesJar', 'javadocJar'].each { task ->
|
|
t.dependsOn ":imgui-$module:$task"
|
|
}
|
|
}
|
|
}
|