Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate dependencies to the Java Library Gradle plugin #314

Merged
merged 2 commits into from
Mar 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ plugins {
apply from: "https://raw.githubusercontent.com/NOVA-Team/NOVA-Gradle/master/shared-scripts/java.gradle"

dependencies {
compile 'com.google.guava:guava:18.0'
compile 'com.typesafe:config:1.2.1'
compile 'se.jbee:silk-di:0.6'
compile 'org.slf4j:slf4j-api:1.7.10'
compile 'org.apache.commons:commons-math3:3.5'
compile 'javax.json:javax.json-api:1.0'
compile 'net.jodah:typetools:0.4.9'

runtime 'org.glassfish:javax.json:1.0.4'
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
api 'com.google.guava:guava:18.0'
api 'com.typesafe:config:1.2.1'
api 'se.jbee:silk-di:0.6'
api 'org.slf4j:slf4j-api:1.7.10'
api 'org.apache.commons:commons-math3:3.5'
api 'javax.json:javax.json-api:1.0'
implementation 'net.jodah:typetools:0.4.9'

runtimeOnly 'org.glassfish:javax.json:1.0.4'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'

//checkstyle 'com.puppycrawl.tools:checkstyle:6.2'
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Aug 18 16:23:23 BRT 2016
#Mon Mar 19 14:35:32 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-bin.zip
22 changes: 15 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
6 changes: 0 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
6 changes: 2 additions & 4 deletions minecraft/1.7/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ configurations {
dependencies {
fatJar project(":")
fatJar 'org.apache.logging.log4j:log4j-slf4j-impl:2.0-beta9'
testCompile project(path: ':', configuration: 'wrapperTests')
testImplementation project(path: ':', configuration: 'wrapperTests')

testCompile "junit:junit:4.12"
testCompile 'org.assertj:assertj-core:3.0.0'
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'
}

jar {
Expand Down
8 changes: 3 additions & 5 deletions minecraft/1.8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ configurations {
dependencies {
fatJar project(":")
fatJar 'org.apache.logging.log4j:log4j-slf4j-impl:2.0-beta9'
testCompile project(path: ':', configuration: 'wrapperTests')
testImplementation project(path: ':', configuration: 'wrapperTests')

testCompile "junit:junit:4.12"
testCompile 'org.assertj:assertj-core:3.0.0'
testRuntime 'org.slf4j:slf4j-simple:1.7.10'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.10'
}

jar {
Expand Down Expand Up @@ -107,7 +105,7 @@ apply plugin: 'forge'

minecraft {
version = property("minecraft.version") + "-" + property("forge.version")
mappings = 'stable_nodoc_16'
mappings = 'stable_16'
runDir = "run"
}

Expand Down
1 change: 0 additions & 1 deletion src/main/java/nova/core/component/ComponentMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
package nova.core.component;

import nova.core.component.ComponentProvider.ComponentAdded;
import nova.core.component.ComponentProvider.ComponentRemoved;
import nova.core.component.exception.ComponentException;
import nova.internal.core.Game;
import se.jbee.inject.Dependency;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/nova/core/util/registry/Factory.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@

import net.jodah.typetools.TypeResolver;
import nova.core.util.Identifiable;
import nova.internal.core.Game;
import nova.internal.core.util.InjectionUtil;
import se.jbee.inject.Dependency;

import java.util.Optional;
import java.util.function.Function;
Expand Down