Skip to content

Commit c75de38

Browse files
juherrctrimble
authored andcommitted
ci: fix build on java 11/17/21
1 parent d440cd0 commit c75de38

File tree

14 files changed

+75
-127
lines changed

14 files changed

+75
-127
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
continue-on-error: true # allow jobs to complete even if some fail
1616
strategy:
1717
matrix:
18-
java: [8]
18+
java: [8, 11, 17, 21]
1919
max-parallel: 4
2020
name: JDK ${{ matrix.java }} | Project
2121
steps:
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
matrix:
50-
build-java: [8]
50+
build-java: [8, 11, 17, 21]
5151
run:
5252
- { java: 8, gradle: '7.6.4' } # AGP Java 8 => Gradle 7.6.4 (MavenPlugin legacy)
5353
- { java: 11, gradle: '7.6.4' }
@@ -87,7 +87,7 @@ jobs:
8787
strategy:
8888
fail-fast: false
8989
matrix:
90-
build-java: [8]
90+
build-java: [8, 11, 17, 21]
9191
run-java: [8, 11, 17, 21]
9292
name: JDK ${{ matrix.build-java }} | Example Gradle (Java) | run on Java ${{ matrix.run-java }}
9393
steps:

jsonschema2pojo-gradle-plugin/example/android/app/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apply plugin: 'com.android.application'
22
apply plugin: 'jsonschema2pojo'
33

44
android {
5+
namespace "jsonschema2pojo.joelittlejohn.github.com.androidexample"
56
compileSdkVersion 30
67

78
defaultConfig {

jsonschema2pojo-gradle-plugin/example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="jsonschema2pojo.joelittlejohn.github.com.androidexample" >
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
43

54
<application
65
android:allowBackup="true"

jsonschema2pojo-gradle-plugin/example/android/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ buildscript {
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:4.2.2'
8+
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
9+
classpath 'com.android.tools.build:gradle:8.5.2'
10+
} else {
11+
classpath 'com.android.tools.build:gradle:4.2.2'
12+
}
913
classpath 'org.jsonschema2pojo:jsonschema2pojo-gradle-plugin:latest.integration'
1014
}
1115
}

jsonschema2pojo-gradle-plugin/example/android/lib/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'jsonschema2pojo'
33

44

55
android {
6+
namespace "jsonschema2pojo.joelittlejohn.github.com.androidexample"
67
compileSdkVersion 30
78

89
defaultConfig {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<manifest package="jsonschema2pojo.joelittlejohn.github.com.androidlibexample">
1+
<manifest>
22

33
<application/>
44
</manifest>

jsonschema2pojo-gradle-plugin/example/android/libMoshi/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apply plugin: 'jsonschema2pojo'
33

44

55
android {
6+
namespace "jsonschema2pojo.joelittlejohn.github.com.androidexample"
67
compileSdkVersion 30
78

89
defaultConfig {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<manifest package="jsonschema2pojo.joelittlejohn.github.com.androidlibexample">
1+
<manifest>
22

33
<application/>
44
</manifest>

jsonschema2pojo-gradle-plugin/example/java/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'jsonschema2pojo'
44
buildscript {
55
repositories {
66
mavenLocal()
7-
jcenter()
7+
mavenCentral()
88
}
99

1010
dependencies {
@@ -16,6 +16,7 @@ buildscript {
1616
}
1717

1818
repositories {
19+
mavenLocal()
1920
mavenCentral()
2021
}
2122

jsonschema2pojo-gradle-plugin/pom.xml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
<artifactId>gradle-api</artifactId>
2727
<version>${gradle.version}</version>
2828
<scope>provided</scope>
29+
<exclusions>
30+
<exclusion>
31+
<groupId>org.codehaus.groovy</groupId>
32+
<artifactId>groovy-all</artifactId>
33+
</exclusion>
34+
</exclusions>
2935
</dependency>
3036
<dependency>
3137
<groupId>org.hamcrest</groupId>
@@ -43,10 +49,6 @@
4349
</dependency>
4450
</dependencies>
4551

46-
<properties>
47-
<integrationTestSourceDirectory>src/integrationTest/groovy</integrationTestSourceDirectory>
48-
</properties>
49-
5052
<build>
5153
<sourceDirectory>${project.basedir}/src/main/groovy</sourceDirectory>
5254
<testSourceDirectory>${project.basedir}/src/test/groovy</testSourceDirectory>
@@ -79,18 +81,6 @@
7981
</sources>
8082
</configuration>
8183
</execution>
82-
<execution>
83-
<id>add-integration-test-sources</id>
84-
<phase>generate-test-sources</phase>
85-
<goals>
86-
<goal>add-test-source</goal>
87-
</goals>
88-
<configuration>
89-
<sources>
90-
<source>${integrationTestSourceDirectory}</source>
91-
</sources>
92-
</configuration>
93-
</execution>
9484
</executions>
9585
</plugin>
9686
<plugin>
@@ -133,22 +123,6 @@
133123
</includes>
134124
</configuration>
135125
</plugin>
136-
<plugin>
137-
<artifactId>maven-failsafe-plugin</artifactId>
138-
<executions>
139-
<execution>
140-
<phase>install</phase>
141-
<goals>
142-
<goal>integration-test</goal>
143-
<goal>verify</goal>
144-
</goals>
145-
</execution>
146-
</executions>
147-
<configuration>
148-
<useFile>false</useFile>
149-
<testSourceDirectory>${integrationTestSourceDirectory}</testSourceDirectory>
150-
</configuration>
151-
</plugin>
152126
<plugin>
153127
<groupId>org.codehaus.mojo</groupId>
154128
<artifactId>codenarc-maven-plugin</artifactId>

0 commit comments

Comments
 (0)