Skip to content

Commit c2f509e

Browse files
committed
Java 13 support
1 parent 58c2dab commit c2f509e

File tree

9 files changed

+115
-122
lines changed

9 files changed

+115
-122
lines changed

build.gradle

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,19 @@ buildscript {
1212
}
1313

1414
plugins {
15-
id 'com.gradle.build-scan' version '1.11'
1615
id "com.jfrog.bintray" version "1.8.0"
1716
id "org.sonarqube" version "2.6.1"
18-
id 'org.unbroken-dome.test-sets' version '1.4.2'
17+
id 'org.unbroken-dome.test-sets' version '2.2.1'
1918
id "info.solidsoft.pitest" version "1.2.4"
2019
}
2120

2221
ext {
2322
JUNIT_JUPITER_VERSION = "5.0.2"
2423
JUNIT_PLATFORM_VERSION = "1.0.2"
25-
MOCKITO_VERSION = "2.12.0"
24+
MOCKITO_VERSION = "3.2.4"
2625
POWER_MOCK_UTILS_VERSION = "1.6.6"
2726
ASSERTJ_CORE_VERSION = "3.8.0"
28-
JACOCO_VERSION = "0.7.9"
27+
JACOCO_VERSION = "0.8.5"
2928
}
3029

3130
apply plugin: 'java'
@@ -34,12 +33,6 @@ apply plugin: 'jacoco'
3433
apply plugin: 'org.junit.platform.gradle.plugin'
3534
apply plugin: 'maven-publish'
3635

37-
buildScan {
38-
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
39-
licenseAgree = 'yes'
40-
publishAlways()
41-
}
42-
4336
repositories {
4437
mavenCentral()
4538
jcenter()
@@ -83,19 +76,22 @@ junitPlatform {
8376

8477
dependencies {
8578
compile("org.slf4j:slf4j-api:1.7.25")
86-
compile("org.apache.commons:commons-lang3:3.7")
79+
compile("org.apache.commons:commons-lang3:3.9")
8780
compile("org.apache.commons:commons-collections4:4.1")
8881
compile("com.googlecode.combinatoricslib:combinatoricslib:2.1")
89-
compile("org.javassist:javassist:3.22.0-GA")
82+
compile("org.javassist:javassist:3.26.0-GA")
83+
compileOnly('org.projectlombok:lombok:1.18.12')
84+
annotationProcessor('org.projectlombok:lombok:1.18.12')
9085

91-
testCompile("org.projectlombok:lombok:1.16.18")
9286
testCompile("org.junit.jupiter:junit-jupiter-api:${JUNIT_JUPITER_VERSION}") { changing = true }
9387
testRuntime("org.junit.jupiter:junit-jupiter-engine:${JUNIT_JUPITER_VERSION}") { changing = true }
9488
testCompile("org.junit.platform:junit-platform-runner:${JUNIT_PLATFORM_VERSION}") { changing = true }
9589
testCompile("org.assertj:assertj-core:${ASSERTJ_CORE_VERSION}")
9690
testCompile("org.mockito:mockito-core:${MOCKITO_VERSION}")
9791
testCompile("org.powermock.tests:powermock-tests-utils:${POWER_MOCK_UTILS_VERSION}")
9892
testCompileOnly("org.apiguardian:apiguardian-api:1.0.0")
93+
testCompileOnly('org.projectlombok:lombok:1.18.12')
94+
testAnnotationProcessor('org.projectlombok:lombok:1.18.12')
9995
}
10096

10197
afterEvaluate {
@@ -108,8 +104,6 @@ afterEvaluate {
108104
task junit5CodeCoverageReport(type: JacocoReport) {
109105
executionData junitPlatformTest
110106
sourceSets sourceSets.main
111-
sourceDirectories = files(project.sourceSets.main.allSource.srcDirs)
112-
classDirectories = files(project.sourceSets.main.output)
113107
reports {
114108
xml.enabled = false
115109
html.destination file("${buildDir}/reports/jacoco/html")
@@ -125,10 +119,6 @@ pitest {
125119
outputFormats = ['XML', 'HTML']
126120
}
127121

128-
task wrapper(type: Wrapper) {
129-
gradleVersion = '4.4'
130-
}
131-
132122
def pomConfig = {
133123
licenses {
134124
license {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
group=pl.pojo
22
artifact=pojo-tester
33
version=0.8.0-SNAPSHOT
4-
sourceCompatibility=1.8
4+
sourceCompatibility=13

gradle/wrapper/gradle-wrapper.jar

205 Bytes
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Sun Dec 17 10:43:20 CET 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

gradlew

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 84 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
rootProject.name = 'pojo-tester'
1+
buildscript {
2+
rootProject.name = 'pojo-tester'
3+
}
4+
5+
plugins {
6+
id "com.gradle.enterprise" version "3.1.1"
7+
}
8+
9+
gradleEnterprise {
10+
buildScan {
11+
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
12+
termsOfServiceAgree = 'yes'
13+
publishAlways()
14+
}
15+
}

src/main/java/pl/pojo/tester/internal/utils/FieldUtils.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,7 @@ public static List<Field> getSpecifiedFields(final Class<?> clazz, final List<St
8484
}
8585

8686
private static void makeModifiable(final Field field) {
87-
final Class<? extends Field> clazz = field.getClass();
88-
try {
89-
field.setAccessible(true);
90-
final Field modifierField = clazz.getDeclaredField(MODIFIERS_FIELD_NAME_IN_FIELD_CLASS);
91-
modifierField.setAccessible(true);
92-
93-
final int modifiers = field.getModifiers() & ~Modifier.FINAL;
94-
modifierField.setInt(field, modifiers);
95-
} catch (IllegalAccessException | NoSuchFieldException e) {
96-
throw new GetOrSetValueException(MODIFIERS_FIELD_NAME_IN_FIELD_CLASS, clazz, e);
97-
}
87+
field.setAccessible(true);
9888
}
9989

10090
private static boolean excludeEmptySet(final List<Field> fields) {

src/test/java/pl/pojo/tester/internal/field/primitive/AbstractPrimitiveValueChangerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class AbstractPrimitiveValueChangerTest {
1313
@Test
1414
void Should_Return_False_When_Field_Is_Not_Primitive() throws Exception {
1515
// given
16-
final Field field = Thread.class.getDeclaredField("threadQ");
16+
final Field field = Thread.class.getDeclaredField("name");
1717
final AbstractPrimitiveValueChanger<Object> changerMock = new ImplementationForTest();
1818

1919
// when

0 commit comments

Comments
 (0)