-
Notifications
You must be signed in to change notification settings - Fork 24
Java 13 support #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Java 13 support #241
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,20 +12,19 @@ buildscript { | |
| } | ||
|
|
||
| plugins { | ||
| id 'com.gradle.build-scan' version '1.11' | ||
| id "com.jfrog.bintray" version "1.8.0" | ||
| id "org.sonarqube" version "2.6.1" | ||
| id 'org.unbroken-dome.test-sets' version '1.4.2' | ||
| id 'org.unbroken-dome.test-sets' version '2.2.1' | ||
| id "info.solidsoft.pitest" version "1.2.4" | ||
| } | ||
|
|
||
| ext { | ||
| JUNIT_JUPITER_VERSION = "5.0.2" | ||
| JUNIT_PLATFORM_VERSION = "1.0.2" | ||
| MOCKITO_VERSION = "2.12.0" | ||
| MOCKITO_VERSION = "3.2.4" | ||
| POWER_MOCK_UTILS_VERSION = "1.6.6" | ||
| ASSERTJ_CORE_VERSION = "3.8.0" | ||
| JACOCO_VERSION = "0.7.9" | ||
| JACOCO_VERSION = "0.8.5" | ||
| } | ||
|
|
||
| apply plugin: 'java' | ||
|
|
@@ -34,12 +33,6 @@ apply plugin: 'jacoco' | |
| apply plugin: 'org.junit.platform.gradle.plugin' | ||
| apply plugin: 'maven-publish' | ||
|
|
||
| buildScan { | ||
| licenseAgreementUrl = 'https://gradle.com/terms-of-service' | ||
| licenseAgree = 'yes' | ||
| publishAlways() | ||
| } | ||
|
|
||
| repositories { | ||
| mavenCentral() | ||
| jcenter() | ||
|
|
@@ -83,19 +76,22 @@ junitPlatform { | |
|
|
||
| dependencies { | ||
| compile("org.slf4j:slf4j-api:1.7.25") | ||
| compile("org.apache.commons:commons-lang3:3.7") | ||
| compile("org.apache.commons:commons-lang3:3.9") | ||
| compile("org.apache.commons:commons-collections4:4.1") | ||
| compile("com.googlecode.combinatoricslib:combinatoricslib:2.1") | ||
| compile("org.javassist:javassist:3.22.0-GA") | ||
| compile("org.javassist:javassist:3.26.0-GA") | ||
| compileOnly('org.projectlombok:lombok:1.18.12') | ||
| annotationProcessor('org.projectlombok:lombok:1.18.12') | ||
|
|
||
| testCompile("org.projectlombok:lombok:1.16.18") | ||
| testCompile("org.junit.jupiter:junit-jupiter-api:${JUNIT_JUPITER_VERSION}") { changing = true } | ||
| testRuntime("org.junit.jupiter:junit-jupiter-engine:${JUNIT_JUPITER_VERSION}") { changing = true } | ||
| testCompile("org.junit.platform:junit-platform-runner:${JUNIT_PLATFORM_VERSION}") { changing = true } | ||
| testCompile("org.assertj:assertj-core:${ASSERTJ_CORE_VERSION}") | ||
| testCompile("org.mockito:mockito-core:${MOCKITO_VERSION}") | ||
| testCompile("org.powermock.tests:powermock-tests-utils:${POWER_MOCK_UTILS_VERSION}") | ||
| testCompileOnly("org.apiguardian:apiguardian-api:1.0.0") | ||
| testCompileOnly('org.projectlombok:lombok:1.18.12') | ||
| testAnnotationProcessor('org.projectlombok:lombok:1.18.12') | ||
| } | ||
|
|
||
| afterEvaluate { | ||
|
|
@@ -108,8 +104,6 @@ afterEvaluate { | |
| task junit5CodeCoverageReport(type: JacocoReport) { | ||
| executionData junitPlatformTest | ||
| sourceSets sourceSets.main | ||
| sourceDirectories = files(project.sourceSets.main.allSource.srcDirs) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why removed? |
||
| classDirectories = files(project.sourceSets.main.output) | ||
| reports { | ||
| xml.enabled = false | ||
| html.destination file("${buildDir}/reports/jacoco/html") | ||
|
|
@@ -125,10 +119,6 @@ pitest { | |
| outputFormats = ['XML', 'HTML'] | ||
| } | ||
|
|
||
| task wrapper(type: Wrapper) { | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why removed? |
||
| gradleVersion = '4.4' | ||
| } | ||
|
|
||
| def pomConfig = { | ||
| licenses { | ||
| license { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| group=pl.pojo | ||
| artifact=pojo-tester | ||
| version=0.8.0-SNAPSHOT | ||
| sourceCompatibility=1.8 | ||
| sourceCompatibility=13 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| #Sun Dec 17 10:43:20 CET 2017 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,15 @@ | ||
| rootProject.name = 'pojo-tester' | ||
| buildscript { | ||
| rootProject.name = 'pojo-tester' | ||
| } | ||
|
|
||
| plugins { | ||
| id "com.gradle.enterprise" version "3.1.1" | ||
| } | ||
|
|
||
| gradleEnterprise { | ||
| buildScan { | ||
| termsOfServiceUrl = 'https://gradle.com/terms-of-service' | ||
| termsOfServiceAgree = 'yes' | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i see, it was moved here. |
||
| publishAlways() | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,17 +84,7 @@ public static List<Field> getSpecifiedFields(final Class<?> clazz, final List<St | |
| } | ||
|
|
||
| private static void makeModifiable(final Field field) { | ||
| final Class<? extends Field> clazz = field.getClass(); | ||
| try { | ||
| field.setAccessible(true); | ||
| final Field modifierField = clazz.getDeclaredField(MODIFIERS_FIELD_NAME_IN_FIELD_CLASS); | ||
| modifierField.setAccessible(true); | ||
|
|
||
| final int modifiers = field.getModifiers() & ~Modifier.FINAL; | ||
| modifierField.setInt(field, modifiers); | ||
| } catch (IllegalAccessException | NoSuchFieldException e) { | ||
| throw new GetOrSetValueException(MODIFIERS_FIELD_NAME_IN_FIELD_CLASS, clazz, e); | ||
| } | ||
| field.setAccessible(true); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i guess it is worth to surround with that try/catch anyway. right now i cannot recall why such implementation was done, but i remember that cant it be that you will adjust to java 13 and at the same time it will not work for java 8 anymore?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we need to try with Java8 for safety. I think your code was probably for final attributes, when we try to make them accessible. |
||
| } | ||
|
|
||
| private static boolean excludeEmptySet(final List<Field> fields) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why removed?
it was required for bintray in order to release lib to repository