mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-06 15:42:12 +01:00
Use Java 11 for build but 8 as target platform
This commit is contained in:
committed by
René Pfeuffer
parent
8c27af2661
commit
17706161ba
@@ -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'
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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' )
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
id 'org.scm-manager.build-info'
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
id 'org.scm-manager.integration-tests'
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'org.scm-manager.java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user