Instead of generating `properties` file we make it always. To provide version value we replace specific token. Also, small tweaks in code which gets the version
46 lines
918 B
Groovy
46 lines
918 B
Groovy
import org.apache.tools.ant.filters.ReplaceTokens
|
|
import tool.generator.GenerateLibs
|
|
|
|
plugins {
|
|
id 'java'
|
|
id 'checkstyle'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(8))
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3'
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.3'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
tasks.register('generateLibs', GenerateLibs) {
|
|
it.dependsOn assemble
|
|
}
|
|
|
|
apply from: "$rootDir/publish.gradle"
|
|
configurePublishing('imgui-java-binding', 'JNI based binding for Dear ImGui', project.version)
|
|
|
|
jar {
|
|
manifest {
|
|
attributes 'Automatic-Module-Name': 'imgui.binding'
|
|
}
|
|
}
|
|
|
|
processResources {
|
|
filesMatching('**/imgui-java.properties') {
|
|
filter(ReplaceTokens, tokens: [
|
|
'version': project.version
|
|
])
|
|
}
|
|
}
|