Skip to content

Commit

Permalink
Simplify Gson setup (#6833)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Nov 17, 2021
1 parent 9122518 commit 753ab21
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 272 deletions.
2 changes: 0 additions & 2 deletions projects/gson/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ ENV MVN $SRC/maven/apache-maven-3.8.3/bin/mvn
RUN git clone --depth 1 https://github.com/google/gson gson
WORKDIR gson
COPY build.sh $SRC/
COPY pom.xml $SRC/gson/pom.xml
COPY gson/pom.xml $SRC/gson/gson/pom.xml
COPY *.java $SRC/
12 changes: 10 additions & 2 deletions projects/gson/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@
#
################################################################################

MAVEN_ARGS="-Dmaven.test.skip=true -Djavac.src.version=11 -Djavac.target.version=11 -X"
$MVN --batch-mode --update-snapshots verify ${MAVEN_ARGS}
# Change Java version because Gson is currently compiled with Java 6, which is only
# supported up to JDK 11, but Docker image uses newer JDK
# Additionally choose >= Java 9 because tests won't compile otherwise (JDK-7196160)
# Skip ProGuard because it is only needed for tests (which are skipped as well) and
# because it would fail since `jmods` JDK folder is removed from this Docker image
MAVEN_ARGS="-DskipTests -Dmaven.compiler.release=9 -Dproguard.skip -X"
# Only build 'gson' Maven module
cd gson
$MVN --batch-mode --update-snapshots package ${MAVEN_ARGS}
cd ..
find ./gson -name "gson-*.jar" -exec mv {} $OUT/gson.jar \;

ALL_JARS="gson.jar"
Expand Down
110 changes: 0 additions & 110 deletions projects/gson/gson/pom.xml

This file was deleted.

158 changes: 0 additions & 158 deletions projects/gson/pom.xml

This file was deleted.

0 comments on commit 753ab21

Please sign in to comment.