-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Gradle setup to match other repositories (#61)
* Change Gradle setup to match java-test-runner and java-representer * Rename analyze.sh to run.sh
- Loading branch information
1 parent
30b8214
commit 8b29a63
Showing
9 changed files
with
256 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
FROM gradle:7.2-jdk8 as build | ||
FROM gradle:8.4-jdk8 as build | ||
|
||
COPY --chown=gradle:gradle . . | ||
RUN gradle installDist --stacktrace | ||
WORKDIR /app | ||
COPY --chown=gradle:gradle . /app | ||
RUN gradle -i --stacktrace clean build shadowJar | ||
|
||
FROM openjdk:8-jre-alpine | ||
|
||
RUN mkdir -p /opt/analyzer | ||
|
||
COPY --from=build /home/gradle/build/install/gradle /opt/analyzer | ||
COPY bin/analyze.sh /opt/analyzer/bin | ||
|
||
WORKDIR /opt/analyzer | ||
COPY bin/run.sh bin/run.sh | ||
COPY --from=build /app/build/libs/java-analyzer.jar . | ||
|
||
ENTRYPOINT ["/opt/analyzer/bin/analyze.sh"] | ||
ENTRYPOINT ["sh", "/opt/analyzer/bin/run.sh"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
java -jar /opt/analyzer/java-analyzer.jar "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
plugins { | ||
id 'java' | ||
id 'application' | ||
id "com.github.johnrengelman.shadow" version "8.1.1" | ||
id "java" | ||
id "application" | ||
} | ||
|
||
mainClassName = 'analyzer.Main' | ||
|
||
sourceCompatibility = 1.8 | ||
group = "org.exercism" | ||
version = "1.0-SNAPSHOT" | ||
mainClassName = "analyzer.Main" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation "junit:junit:4.13.2" | ||
implementation 'org.json:json:20180813' | ||
implementation 'com.github.javaparser:javaparser-core:3.12.0' | ||
implementation 'com.google.guava:guava:28.0-jre' | ||
implementation "org.json:json:20180813" | ||
implementation "com.github.javaparser:javaparser-core:3.12.0" | ||
implementation "com.google.guava:guava:28.0-jre" | ||
testImplementation "com.google.truth:truth:1.0" | ||
testImplementation "com.google.truth.extensions:truth-java8-extension:1.0" | ||
} | ||
|
||
run { | ||
if (project.hasProperty('args')) { | ||
args findProperty('args').split(" ") | ||
} | ||
shadowJar { | ||
mergeServiceFiles() | ||
archiveFileName.set("java-analyzer.jar") | ||
} | ||
|
||
artifacts { | ||
archives shadowJar | ||
} | ||
|
||
task runStats(type: JavaExec) { | ||
group = "Execution" | ||
description = "Run the Statistics class with JavaExecTask" | ||
classpath = sourceSets.main.runtimeClasspath | ||
main = 'analyzer.Statistics' | ||
if (project.hasProperty('args')) { | ||
args findProperty('args').split(" ") | ||
test { | ||
testLogging { | ||
exceptionFormat = "full" | ||
showStandardStreams = true | ||
events = ["passed", "failed", "skipped"] | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.