mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-02 19:29:17 +00:00
Determining version based on manifest file
This allowing Gradle to manage the versions and share them across both build and runtime environments.
This commit is contained in:
parent
47dc4038f3
commit
4541f38eb1
@ -19,7 +19,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mainClassName = 'com.webcodepro.applecommander.ui.AppleCommander'
|
mainClassName = 'com.webcodepro.applecommander.ui.AppleCommander'
|
||||||
version '1.3.6-BETA'
|
version "${version}"
|
||||||
|
|
||||||
// Disable default JAR creation
|
// Disable default JAR creation
|
||||||
jar {
|
jar {
|
||||||
@ -33,6 +33,8 @@ tasks.withType(Javadoc) {
|
|||||||
tasks.withType(Jar) {
|
tasks.withType(Jar) {
|
||||||
manifest {
|
manifest {
|
||||||
attributes 'Main-Class': 'com.webcodepro.applecommander.ui.AppleCommander'
|
attributes 'Main-Class': 'com.webcodepro.applecommander.ui.AppleCommander'
|
||||||
|
attributes 'Implementation-Title': 'AppleCommander',
|
||||||
|
'Implementation-Version': version
|
||||||
}
|
}
|
||||||
from('LICENSE', 'CONTRIB', 'TODO', 'VERSIONS')
|
from('LICENSE', 'CONTRIB', 'TODO', 'VERSIONS')
|
||||||
}
|
}
|
||||||
|
4
gradle.properties
Normal file
4
gradle.properties
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Universal AppleCommander version number. Used for:
|
||||||
|
# - Naming JAR file.
|
||||||
|
# - The build will insert this into a file that is read at run time as well.
|
||||||
|
version=1.4.0-BETA
|
@ -40,8 +40,13 @@ import com.webcodepro.applecommander.util.TextBundle;
|
|||||||
* @author Rob Greene
|
* @author Rob Greene
|
||||||
*/
|
*/
|
||||||
public class AppleCommander {
|
public class AppleCommander {
|
||||||
public static final String VERSION = "1.4.0-BETA"; //$NON-NLS-1$
|
public static final String VERSION;
|
||||||
private static TextBundle textBundle = UiBundle.getInstance();
|
private static TextBundle textBundle = UiBundle.getInstance();
|
||||||
|
|
||||||
|
static {
|
||||||
|
VERSION = AppleCommander.class.getPackage().getImplementationVersion();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch AppleCommander.
|
* Launch AppleCommander.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user