diff options
author | md_5 <git@md-5.net> | 2017-08-11 16:39:47 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-08-11 16:39:47 +1000 |
commit | 59469f0fef76246025b63f0dd3287cfa19a06505 (patch) | |
tree | fd90ef59b52ea6ec2b33db3e277a98646dc72494 | |
parent | 7f7e5316b33097e2cb1f932c4c092fe42677df80 (diff) | |
download | buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar.gz buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar.lz buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.tar.xz buildtools-59469f0fef76246025b63f0dd3287cfa19a06505.zip |
Various updates
-rw-r--r-- | pom.xml | 35 | ||||
-rw-r--r-- | src/main/java/org/spigotmc/builder/Bootstrap.java | 25 | ||||
-rw-r--r-- | src/main/java/org/spigotmc/builder/Builder.java | 10 |
3 files changed, 40 insertions, 30 deletions
@@ -13,6 +13,8 @@ <properties> <build.number>unknown</build.number> + <maven.compiler.source>1.6</maven.compiler.source> + <maven.compiler.target>1.6</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> @@ -21,11 +23,12 @@ <groupId>com.custardsource.dybdob</groupId> <artifactId>java-diff-utils-copy</artifactId> <version>1.0.1</version> + <scope>compile</scope> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> - <version>19.0</version> + <version>20.0</version> <scope>compile</scope> </dependency> <dependency> @@ -37,35 +40,32 @@ <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit</artifactId> - <version>4.4.1.201607150455-r</version> + <version>4.5.2.201704071617-r</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> - <version>1.7.21</version> + <version>1.7.25</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> - <version>1.16.12</version> + <version>1.16.16</version> <scope>provided</scope> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.5</version> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-compress</artifactId> - <version>1.12</version> + <scope>compile</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> - <version>2.7</version> + <version>2.8.1</version> + <scope>compile</scope> </dependency> </dependencies> @@ -90,21 +90,12 @@ </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.1</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>2.5</version> + <version>3.0.2</version> <configuration> <archive> <manifestEntries> - <Main-Class>org.spigotmc.builder.Builder</Main-Class> + <Main-Class>org.spigotmc.builder.Bootstrap</Main-Class> <Implementation-Version>${describe}</Implementation-Version> </manifestEntries> </archive> @@ -113,7 +104,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>2.3</version> + <version>3.0.0</version> <executions> <execution> <phase>package</phase> diff --git a/src/main/java/org/spigotmc/builder/Bootstrap.java b/src/main/java/org/spigotmc/builder/Bootstrap.java new file mode 100644 index 0000000..aba3d81 --- /dev/null +++ b/src/main/java/org/spigotmc/builder/Bootstrap.java @@ -0,0 +1,25 @@ +package org.spigotmc.builder; + +public class Bootstrap +{ + + public static void main(String[] args) throws Exception + { + float javaVersion = Float.parseFloat( System.getProperty( "java.class.version" ) ); + + if ( javaVersion < 51.0 ) + { + System.err.println( "Outdated Java detected (" + javaVersion + "). BuildTools requires at least Java 7. Please update Java and try again." ); + System.err.println( "You may use java -version to double check your Java version." ); + return; + } + + if ( javaVersion != 52.0 ) + { + System.err.println( "*** WARNING *** You are not using Java 8. Java 8 is the only supported version for Minecraft versions >= 1.12." ); + System.err.println( "*** WARNING *** Please use java -version to check your version and note that early access versions of Java are not supported either." ); + } + + Builder.main( args ); + } +} diff --git a/src/main/java/org/spigotmc/builder/Builder.java b/src/main/java/org/spigotmc/builder/Builder.java index 7cab141..774ddad 100644 --- a/src/main/java/org/spigotmc/builder/Builder.java +++ b/src/main/java/org/spigotmc/builder/Builder.java @@ -138,12 +138,6 @@ public class Builder logOutput(); - if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) != 52.0 ) - { - System.err.println( "*** WARNING *** You are not using Java 8. Java 8 is the only supported version for Minecraft versions >= 1.12." ); - System.err.println( "*** WARNING *** Please use java -version to check your version and note that early access versions of Java are not supported either." ); - } - try { runProcess( CWD, "sh", "-c", "exit" ); @@ -201,7 +195,7 @@ public class Builder String m2Home = System.getenv( "M2_HOME" ); if ( m2Home == null || !( maven = new File( m2Home ) ).exists() ) { - maven = new File( "apache-maven-3.2.5" ); + maven = new File( "apache-maven-3.5.0" ); if ( !maven.exists() ) { @@ -210,7 +204,7 @@ public class Builder File mvnTemp = new File( "mvn.zip" ); mvnTemp.deleteOnExit(); - download( "https://static.spigotmc.org/maven/apache-maven-3.2.5-bin.zip", mvnTemp ); + download( "https://static.spigotmc.org/maven/apache-maven-3.5.0-bin.zip", mvnTemp ); unzip( mvnTemp, new File( "." ) ); } } |