mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2024-12-21 01:30:34 +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'
|
||||
version '1.3.6-BETA'
|
||||
version "${version}"
|
||||
|
||||
// Disable default JAR creation
|
||||
jar {
|
||||
@ -33,7 +33,9 @@ tasks.withType(Javadoc) {
|
||||
tasks.withType(Jar) {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'com.webcodepro.applecommander.ui.AppleCommander'
|
||||
}
|
||||
attributes 'Implementation-Title': 'AppleCommander',
|
||||
'Implementation-Version': version
|
||||
}
|
||||
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
|
||||
*/
|
||||
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();
|
||||
|
||||
static {
|
||||
VERSION = AppleCommander.class.getPackage().getImplementationVersion();
|
||||
}
|
||||
|
||||
/**
|
||||
* Launch AppleCommander.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user