diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ebfb948..71539e0 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -13,28 +13,25 @@ on: pull_request: branches: [ develop ] -permissions: - contents: read - jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - - name: Build with Gradle - uses: gradle/gradle-build-action@v2.8.0 - with: - arguments: build - env: - ossrhUsername: ${{secrets.OSSRHUSERNAME}} - ossrhPassword: ${{secrets.OSSRHPASSWORD}} - - uses: codecov/codecov-action@v2 - with: - token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@v2.8.0 + with: + arguments: build + env: + ossrhUsername: ${{secrets.OSSRHUSERNAME}} + ossrhPassword: ${{secrets.OSSRHPASSWORD}} + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos diff --git a/build.gradle b/build.gradle index ca787d5..08ce9c2 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,9 @@ apply from: "gradle/publishing.gradle" apply from: "gradle/repositories.gradle" apply from: "gradle/testing.gradle" -sourceCompatibility = "$projectSourceCompatibility" as Object +java { + sourceCompatibility = "$projectSourceCompatibility" as Object +} tasks.withType(JavaCompile) { options.encoding = "UTF-8" diff --git a/gradle.properties b/gradle.properties index 92aee36..3ece275 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ ###################### projectVersion=9.1-SNAPSHOT groupPackage=io.github.astrapi69 -projectSourceCompatibility=11 +projectSourceCompatibility=17 projectInceptionYear=2015 projectHolderUsername=astrapi69 projectLeaderName=Asterios Raptis @@ -28,28 +28,28 @@ projectRepositoriesPasswordKey=ossrhPassword ########################### # gradle-plugins versions # ########################### -gradlePluginVersionsVersion=0.47.0 +gradlePluginVersionsVersion=0.48.0 licenseGradlePluginVersion=0.16.1 grgitGradlePluginVersion=5.2.0 -spotlessGradlePluginVersion=6.20.0 +spotlessGradlePluginVersion=6.21.0 ######################### # dependencies versions # ######################### jobjCoreVersion=7.1 jobjReflectVersion=1 -sillyCollectionVersion=21 -vintageTimeVersion=5.4 +sillyCollectionVersion=27 +vintageTimeVersion=6 sillyMathVersion=2.2 -jobjCopyVersion=3.7 +jobjCopyVersion=4 ############################## # test dependencies versions # ############################## -commonsLang3Version=3.12.0 +commonsLang3Version=3.13.0 sillyStringsVersion=8.2 meanbeanVersion=2.0.3 testngVersion=7.8.0 testObjectVersion=7.2 -equalsverifierVersion=3.15 +equalsverifierVersion=3.15.1 ########################## # for deploy on sonatype # ########################## diff --git a/gradle/formatting.gradle b/gradle/formatting.gradle index e0a5ae9..853e80c 100644 --- a/gradle/formatting.gradle +++ b/gradle/formatting.gradle @@ -11,6 +11,8 @@ spotless { endWithNewline() } java { - eclipse("4.19.0").configFile("src/test/resources/alpharo-formatter.xml") + // export config file: https://github.com/diffplug/spotless/blob/main/ECLIPSE_SCREENSHOTS.md#creating-spotlessimportorder + importOrderFile('src/test/resources/spotless/importorder.properties') // import order file as exported from eclipse + eclipse("4.21").configFile("src/test/resources/spotless/alpharo-formatter.xml") } } diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 8487f9d..7e1b228 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -8,7 +8,9 @@ task sourcesJar(type: Jar) { task javadocJar(type: Jar) { from javadoc archiveClassifier.set("javadoc") - javadoc.properties.failOnError = true + javadoc { + failOnError = false + } } javadoc { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 151b34a..f1d866b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ #Wed Jan 22 15:59:51 CET 2020 -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java new file mode 100644 index 0000000..db542ca --- /dev/null +++ b/src/main/java/module-info.java @@ -0,0 +1,10 @@ +module randomizer.main +{ + requires java.desktop; + requires silly.collection; + requires jobj.core.main; + requires jobj.reflect.main; + requires jobj.copy.main; + requires silly.math; + requires vintage.time.main; +} \ No newline at end of file diff --git a/src/test/java/io/github/astrapi69/random/SecureRandomBeanTest.java b/src/test/java/io/github/astrapi69/random/SecureRandomBeanTest.java index ec92880..4ca696b 100644 --- a/src/test/java/io/github/astrapi69/random/SecureRandomBeanTest.java +++ b/src/test/java/io/github/astrapi69/random/SecureRandomBeanTest.java @@ -26,11 +26,11 @@ import static org.testng.Assert.assertNotNull; -import nl.jqno.equalsverifier.EqualsVerifier; - import org.meanbean.test.BeanTester; import org.testng.annotations.Test; +import nl.jqno.equalsverifier.EqualsVerifier; + /** * The unit test class for the class {@link SecureRandomBean} */ diff --git a/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryParameterizedTest.java b/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryParameterizedTest.java index eb06a9e..b192e36 100644 --- a/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryParameterizedTest.java +++ b/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryParameterizedTest.java @@ -24,7 +24,10 @@ */ package io.github.astrapi69.random.object; +import static org.testng.AssertJUnit.assertNotNull; + import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; import io.github.astrapi69.test.object.A; import io.github.astrapi69.test.object.AlgorithmModel; @@ -48,9 +51,6 @@ import io.github.astrapi69.test.object.auth.Role; import io.github.astrapi69.test.object.auth.Roles; import io.github.astrapi69.test.object.exception.ExceptionEvent; -import org.testng.annotations.Test; - -import static org.testng.AssertJUnit.assertNotNull; /** * The unit test class for the class {@link RandomObjectFactory} diff --git a/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryTest.java b/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryTest.java index cfc57e4..d3cf9a6 100644 --- a/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryTest.java +++ b/src/test/java/io/github/astrapi69/random/object/RandomObjectFactoryTest.java @@ -40,8 +40,6 @@ import java.util.Set; import java.util.UUID; -import io.github.astrapi69.test.object.Employee; -import io.github.astrapi69.test.object.EmployeeList; import org.apache.commons.lang3.ArrayUtils; import org.meanbean.test.BeanTester; import org.testng.annotations.Test; @@ -49,6 +47,8 @@ import io.github.astrapi69.collection.list.ListFactory; import io.github.astrapi69.math.MathExtensions; import io.github.astrapi69.random.enums.RandomAlgorithm; +import io.github.astrapi69.test.object.Employee; +import io.github.astrapi69.test.object.EmployeeList; import io.github.astrapi69.test.object.Person; import io.github.astrapi69.test.object.PrimitiveArrays; import io.github.astrapi69.test.object.enumtype.Gender; diff --git a/src/test/resources/alpharo-formatter.xml b/src/test/resources/spotless/alpharo-formatter.xml similarity index 100% rename from src/test/resources/alpharo-formatter.xml rename to src/test/resources/spotless/alpharo-formatter.xml diff --git a/src/test/resources/spotless/importorder.properties b/src/test/resources/spotless/importorder.properties new file mode 100644 index 0000000..3f8b21e --- /dev/null +++ b/src/test/resources/spotless/importorder.properties @@ -0,0 +1,6 @@ +#Organize Import Order +#Fri Dec 02 17:15:08 CET 2022 +0=java +1=javax +2=org +3=com