Use Java 11 for build but 8 as target platform

This commit is contained in:
Sebastian Sdorra
2021-01-06 11:41:13 +01:00
committed by René Pfeuffer
parent 8c27af2661
commit 17706161ba
11 changed files with 58 additions and 6 deletions

View File

@@ -44,6 +44,10 @@ dependencies {
gradlePlugin {
// Define the plugin
plugins {
javaModule {
id = 'org.scm-manager.java'
implementationClass = 'com.cloudogu.scm.JavaModulePlugin'
}
buildInfo {
id = 'org.scm-manager.build-info'
implementationClass = 'com.cloudogu.scm.BuildInfoPlugin'

View File

@@ -0,0 +1,45 @@
/*
* MIT License
*
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.cloudogu.scm
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.jvm.toolchain.JavaLanguageVersion
class JavaModulePlugin implements Plugin<Project> {
void apply(Project project) {
project.afterEvaluate {
project.java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
project.compileJava {
options.release = 8
}
}
}
}

View File

@@ -117,11 +117,6 @@ subprojects {
}
}
project.tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
apply from: rootProject.file( 'gradle/dependencies.gradle' )
}

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
}
dependencies {

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
}
dependencies {

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
id 'org.scm-manager.build-info'
}

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
}
dependencies {

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
id 'org.scm-manager.integration-tests'
}

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
}
dependencies {

View File

@@ -24,6 +24,7 @@
plugins {
id 'java-library'
id 'org.scm-manager.java'
}
dependencies {

View File

@@ -24,8 +24,9 @@
plugins {
id 'war'
id 'org.scm-manager.core-plugins'
id 'org.scm-manager.java'
id 'org.scm-manager.serve'
id 'org.scm-manager.core-plugins'
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.6'
}