From 85e0f99daa175cb43ed480aab3e4fafdf17ed962 Mon Sep 17 00:00:00 2001 From: Martin Bonnin Date: Tue, 20 Sep 2022 17:52:32 +0200 Subject: [PATCH] set Java8 target compatibility --- core/koin-test-junit4/build.gradle | 8 +++++++- core/koin-test-junit5/build.gradle | 8 +++++++- gradle/publish-to-central.gradle | 2 +- plugins/koin-gradle-plugin/build.gradle | 8 +++++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/core/koin-test-junit4/build.gradle b/core/koin-test-junit4/build.gradle index 89313db75..c7020a202 100644 --- a/core/koin-test-junit4/build.gradle +++ b/core/koin-test-junit4/build.gradle @@ -10,4 +10,10 @@ dependencies { testImplementation "org.mockito:mockito-inline:$mockito_version" } -apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file +apply from: '../../gradle/publish-to-central.gradle' + +// Ensure "org.gradle.jvm.version" is set to "8" in Gradle metadata. +compileJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} \ No newline at end of file diff --git a/core/koin-test-junit5/build.gradle b/core/koin-test-junit5/build.gradle index 64ff59057..eb2b2a782 100644 --- a/core/koin-test-junit5/build.gradle +++ b/core/koin-test-junit5/build.gradle @@ -14,4 +14,10 @@ apply from: '../../gradle/publish-to-central.gradle' test { useJUnitPlatform() -} \ No newline at end of file +} + +// Ensure "org.gradle.jvm.version" is set to "8" in Gradle metadata. +compileJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} diff --git a/gradle/publish-to-central.gradle b/gradle/publish-to-central.gradle index 1368309d2..c1a87e364 100644 --- a/gradle/publish-to-central.gradle +++ b/gradle/publish-to-central.gradle @@ -116,4 +116,4 @@ afterEvaluate { // useGpgCmd() } } -} \ No newline at end of file +} diff --git a/plugins/koin-gradle-plugin/build.gradle b/plugins/koin-gradle-plugin/build.gradle index 10fc5f739..b9ede64f8 100644 --- a/plugins/koin-gradle-plugin/build.gradle +++ b/plugins/koin-gradle-plugin/build.gradle @@ -19,4 +19,10 @@ repositories { mavenCentral() } -apply from: '../../gradle/publish-to-central.gradle' \ No newline at end of file +apply from: '../../gradle/publish-to-central.gradle' + +// Ensure "org.gradle.jvm.version" is set to "8" in Gradle metadata. +compileJava { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +}