mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 01:07:34 +01:00
Add commit hash to a version name of snapshot builds.
This commit is contained in:
parent
75bba88e28
commit
b539c3c1a1
@ -49,6 +49,18 @@
|
|||||||
</excludes>
|
</excludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>pl.project13.maven</groupId>
|
||||||
|
<artifactId>git-commit-id-plugin</artifactId>
|
||||||
|
<version>1.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>revision</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@ -104,4 +116,12 @@
|
|||||||
<version>1.3</version>
|
<version>1.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>sonatype-releases</id>
|
||||||
|
<name>Sonatype Releases</name>
|
||||||
|
<url>https://oss.sonatype.org/content/repositories/releases/</url>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
</project>
|
</project>
|
||||||
|
@ -375,7 +375,11 @@ public class Androlib {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getVersion() {
|
public static String getVersion() {
|
||||||
return ApktoolProperties.get("aversion");
|
String version = ApktoolProperties.get("aversion");
|
||||||
|
return version.endsWith("-SNAPSHOT") ?
|
||||||
|
version.substring(0, version.length() - 9) + '.' +
|
||||||
|
ApktoolProperties.get("git.commit.id.abbrev")
|
||||||
|
: version;
|
||||||
}
|
}
|
||||||
|
|
||||||
private File[] parseUsesFramework(Map<String, Object> usesFramework)
|
private File[] parseUsesFramework(Map<String, Object> usesFramework)
|
||||||
|
@ -1 +1,2 @@
|
|||||||
aversion = ${aversion}
|
aversion = ${aversion}
|
||||||
|
git.commit.id.abbrev = ${git.commit.id.abbrev}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user