mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
Merge pull request #741 from jscrdev/setup-java-11
Configure Java 8 as the minimum required version
This commit is contained in:
commit
c29d4881e0
37
.github/workflows/pipeline.yml
vendored
37
.github/workflows/pipeline.yml
vendored
@ -10,46 +10,21 @@ on:
|
|||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# old-school build and jar method. No tests run or compiled.
|
|
||||||
build-1_6:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
# build for java 1.6, however don't run any tests
|
|
||||||
java: [ 1.6 ]
|
|
||||||
name: Java ${{ matrix.java }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Setup java
|
|
||||||
uses: actions/setup-java@v1
|
|
||||||
with:
|
|
||||||
java-version: ${{ matrix.java }}
|
|
||||||
- name: Compile Java ${{ matrix.java }}
|
|
||||||
run: |
|
|
||||||
mkdir -p target/classes
|
|
||||||
javac -d target/classes/ src/main/java/org/json/*.java
|
|
||||||
- name: Create java ${{ matrix.java }} JAR
|
|
||||||
run: |
|
|
||||||
jar cvf target/org.json.jar -C target/classes .
|
|
||||||
- name: Upload Java ${{ matrix.java }} JAR
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Java ${{ matrix.java }} JAR
|
|
||||||
path: target/org.json.jar
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
# build against supported Java LTS versions:
|
# build against supported Java LTS versions:
|
||||||
java: [ 8, 11 ]
|
java: [ 8, 11, 17 ]
|
||||||
name: Java ${{ matrix.java }}
|
name: Java ${{ matrix.java }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Setup java
|
- name: Set up JDK ${{ matrix.java }}
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
|
distribution: 'temurin'
|
||||||
java-version: ${{ matrix.java }}
|
java-version: ${{ matrix.java }}
|
||||||
|
cache: 'maven'
|
||||||
- name: Compile Java ${{ matrix.java }}
|
- name: Compile Java ${{ matrix.java }}
|
||||||
run: mvn clean compile -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true
|
run: mvn clean compile -Dmaven.compiler.source=${{ matrix.java }} -Dmaven.compiler.target=${{ matrix.java }} -Dmaven.test.skip=true -Dmaven.site.skip=true -Dmaven.javadoc.skip=true
|
||||||
- name: Run Tests ${{ matrix.java }}
|
- name: Run Tests ${{ matrix.java }}
|
||||||
|
@ -22,7 +22,7 @@ repositories {
|
|||||||
dependencies {
|
dependencies {
|
||||||
testImplementation 'junit:junit:4.13.1'
|
testImplementation 'junit:junit:4.13.1'
|
||||||
testImplementation 'com.jayway.jsonpath:json-path:2.1.0'
|
testImplementation 'com.jayway.jsonpath:json-path:2.1.0'
|
||||||
testImplementation 'org.mockito:mockito-core:1.9.5'
|
testImplementation 'org.mockito:mockito-core:4.2.0'
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
@ -30,9 +30,9 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = 'org.json'
|
group = 'org.json'
|
||||||
version = 'v20211205-SNAPSHOT'
|
version = 'v20230618-SNAPSHOT'
|
||||||
description = 'JSON in Java'
|
description = 'JSON in Java'
|
||||||
sourceCompatibility = '1.7'
|
sourceCompatibility = '1.8'
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
}
|
}
|
||||||
|
18
pom.xml
18
pom.xml
@ -69,7 +69,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mockito</groupId>
|
<groupId>org.mockito</groupId>
|
||||||
<artifactId>mockito-core</artifactId>
|
<artifactId>mockito-core</artifactId>
|
||||||
<version>1.9.5</version>
|
<version>4.2.0</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@ -79,7 +79,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.felix</groupId>
|
<groupId>org.apache.felix</groupId>
|
||||||
<artifactId>maven-bundle-plugin</artifactId>
|
<artifactId>maven-bundle-plugin</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>5.1.9</version>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<instructions>
|
<instructions>
|
||||||
@ -93,16 +93,16 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>2.3.2</version>
|
<version>3.11.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>1.6</source>
|
<source>1.8</source>
|
||||||
<target>1.6</target>
|
<target>1.8</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<version>2.1.2</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-sources</id>
|
<id>attach-sources</id>
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>2.7</version>
|
<version>3.5.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>attach-javadocs</id>
|
<id>attach-javadocs</id>
|
||||||
@ -131,7 +131,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-gpg-plugin</artifactId>
|
<artifactId>maven-gpg-plugin</artifactId>
|
||||||
<version>1.5</version>
|
<version>1.6</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>sign-artifacts</id>
|
<id>sign-artifacts</id>
|
||||||
@ -187,7 +187,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.3.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -626,9 +626,9 @@ public class JSONObjectTest {
|
|||||||
assertTrue("expected 42", Integer.valueOf("42").equals(jsonObject.query("/intKey")));
|
assertTrue("expected 42", Integer.valueOf("42").equals(jsonObject.query("/intKey")));
|
||||||
assertTrue("expected -23.45e7", Double.valueOf("-23.45e7").equals(jsonObject.query("/doubleKey")));
|
assertTrue("expected -23.45e7", Double.valueOf("-23.45e7").equals(jsonObject.query("/doubleKey")));
|
||||||
// sorry, mockito artifact
|
// sorry, mockito artifact
|
||||||
assertTrue("expected 2 callbacks items", ((List<?>)(JsonPath.read(doc, "$.callbacks"))).size() == 2);
|
assertTrue("expected 2 mockitoInterceptor items", ((Map<?,?>)(JsonPath.read(doc, "$.mockitoInterceptor"))).size() == 2);
|
||||||
assertTrue("expected 0 handler items", ((Map<?,?>)(JsonPath.read(doc, "$.callbacks[0].handler"))).size() == 0);
|
assertTrue("expected 0 mockitoInterceptor.serializationSupport items",
|
||||||
assertTrue("expected 0 callbacks[1] items", ((Map<?,?>)(JsonPath.read(doc, "$.callbacks[1]"))).size() == 0);
|
((Map<?,?>)(JsonPath.read(doc, "$.mockitoInterceptor.serializationSupport"))).size() == 0);
|
||||||
Util.checkJSONObjectMaps(jsonObject);
|
Util.checkJSONObjectMaps(jsonObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user