Browse Source

finekit版本信息

pull/1/head
richie 5 years ago
parent
commit
ea6dadfaa5
  1. 2
      build.gradle
  2. 19
      src/main/java/com/fanruan/api/FineKit.java

2
build.gradle

@ -17,7 +17,7 @@ static def getDate() {
jar { jar {
manifest{ manifest{
attributes ("Manifest-Version" : "10.0", "Build" : getDate()) attributes ("Implementation-Version" : "10.0", "Specification-Version" : getDate())
} }
baseName 'finekit' baseName 'finekit'
version archiveVersion.get() + "-" + getDate() version archiveVersion.get() + "-" + getDate()

19
src/main/java/com/fanruan/api/FineKit.java

@ -1,8 +1,5 @@
package com.fanruan.api; package com.fanruan.api;
import java.io.IOException;
import java.util.Properties;
/** /**
* @author richie * @author richie
* @version 10.0 * @version 10.0
@ -10,19 +7,13 @@ import java.util.Properties;
*/ */
public class FineKit { public class FineKit {
private static String version; private final static String version;
private static String build; private final static String build;
static { static {
Properties properties = new Properties(); Package pkg = FineKit.class.getPackage();
try { version = pkg.getImplementationVersion();
properties.load(FineKit.class.getResourceAsStream("/version.properties")); build = pkg.getSpecificationVersion();
version = properties.getProperty("version");
build = properties.getProperty("build");
} catch (IOException ignore) {
version = "10.0";
build = "20190815";
}
} }
/** /**

Loading…
Cancel
Save