diff --git a/brut.apktool/apktool-lib/src/main/resources/properties/apktool.properties b/brut.apktool/apktool-lib/src/main/resources/properties/apktool.properties index f569a5c8..36c063db 100644 --- a/brut.apktool/apktool-lib/src/main/resources/properties/apktool.properties +++ b/brut.apktool/apktool-lib/src/main/resources/properties/apktool.properties @@ -1,2 +1,2 @@ -application.version=${version} -git.commit.id.abbrev = ${git.commit.id.abbrev} +application.version=@version@ +git.commit.id.abbrev=@gitrev@ diff --git a/build.gradle b/build.gradle index 4e17644e..639ba9de 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'java' apply plugin: 'maven' apply plugin: 'license' +ext.apktoolversion = '1.5.1-SNAPSHOT' repositories { mavenCentral() @@ -90,6 +91,11 @@ subprojects { } } project(':brut.apktool:apktool-lib') { + processResources { + ext.fullrev = '' + ant.loadfile(srcFile: "../../.git/refs/heads/master", property: ext.fullrev) + filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [version: apktoolversion, gitrev: ant.properties[ext.fullrev].substring(0,10)]) + } dependencies { compile ("junit:junit:4.10") { exclude(module: 'hamcrest-core') @@ -101,6 +107,8 @@ subprojects { } } project(':brut.apktool:apktool-cli') { + version = apktoolversion + gradle.taskGraph.whenReady { // build a jar containing all dependencies jar { @@ -115,4 +123,4 @@ subprojects { dependencies { compile project(':brut.apktool:apktool-lib') } - } \ No newline at end of file + }