enforced Java 8 compatibility
This commit is contained in:
@@ -5,9 +5,9 @@ plugins {
|
|||||||
dependencies {
|
dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
|
||||||
["apiElements", "runtimeElements"].each { String name ->
|
["apiElements", "runtimeElements"].each { String name ->
|
||||||
|
@@ -5,9 +5,9 @@ plugins {
|
|||||||
|
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
@@ -13,7 +13,7 @@ gradlePlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
@@ -4,9 +4,9 @@ plugins {
|
|||||||
|
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
@@ -19,6 +19,8 @@ import org.gradle.api.tasks.javadoc.Javadoc;
|
|||||||
import org.gradle.jvm.toolchain.JavaToolchainSpec;
|
import org.gradle.jvm.toolchain.JavaToolchainSpec;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class LombokPlugin implements Plugin<Project> {
|
public class LombokPlugin implements Plugin<Project> {
|
||||||
@@ -34,11 +36,13 @@ public class LombokPlugin implements Plugin<Project> {
|
|||||||
);
|
);
|
||||||
project.afterEvaluate(p -> {
|
project.afterEvaluate(p -> {
|
||||||
SourceSetContainer sourceSetContainer = project.getExtensions().findByType(JavaPluginExtension.class).getSourceSets();
|
SourceSetContainer sourceSetContainer = project.getExtensions().findByType(JavaPluginExtension.class).getSourceSets();
|
||||||
Provider<Map<String, String>> dependencyNotationProvider = project.provider(() ->
|
Provider<Map<String, String>> dependencyNotationProvider = project.provider(() -> {
|
||||||
Map.of("group", "org.projectlombok",
|
Map<String, String> m = new HashMap<>();
|
||||||
"name", "lombok",
|
m.put("group", "org.projectlombok");
|
||||||
"version", ext.getVersion().get())
|
m.put("name", "lombok");
|
||||||
);
|
m.put("version", ext.getVersion().get());
|
||||||
|
return Collections.unmodifiableMap(m);
|
||||||
|
});
|
||||||
Configuration lombokConfiguration = project.getConfigurations().create("lombok");
|
Configuration lombokConfiguration = project.getConfigurations().create("lombok");
|
||||||
project.getDependencies().addProvider(
|
project.getDependencies().addProvider(
|
||||||
lombokConfiguration.getName(),
|
lombokConfiguration.getName(),
|
||||||
|
@@ -18,7 +18,7 @@ gradlePlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
@@ -8,10 +8,11 @@ childProjects.forEach {name, child ->
|
|||||||
child.with {
|
child.with {
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
@@ -50,6 +51,11 @@ dependencies {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
into("META-INF") {
|
into("META-INF") {
|
||||||
from(configurations.embedded)
|
from(configurations.embedded)
|
||||||
|
@@ -5,9 +5,9 @@ plugins {
|
|||||||
|
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
java {
|
compileJava {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
options.release = 8
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
options.compilerArgs << '-parameters'
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
Reference in New Issue
Block a user