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 {
manifest{
attributes ("Manifest-Version" : "10.0", "Build" : getDate())
attributes ("Implementation-Version" : "10.0", "Specification-Version" : getDate())
}
baseName 'finekit'
version archiveVersion.get() + "-" + getDate()

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

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

Loading…
Cancel
Save