Skip to content

Commit

Permalink
Deprecations fixes and minor improvements in gradle scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
altro3 committed Oct 27, 2023
1 parent 7be0f2e commit a0a28d6
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you are interested in contributing to the Micronaut Framework and are looking

## JDK Setup

The Micronaut Framework currently requires JDK 8
The Micronaut Framework currently requires JDK 17

## IDE Setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
mavenCentral()
}

configurations.all {
configurations.configureEach {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
Expand Down Expand Up @@ -62,7 +62,7 @@ tasks.withType(Jar).configureEach {
preserveFileTimestamps = false
}

configurations.all {
configurations.configureEach {
resolutionStrategy.dependencySubstitution {
rootProject.subprojects.each {
if (!it.name.startsWith('test-')) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ plugins {
id "io.micronaut.build.internal.convention-base"
}

configurations {
all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
String group = details.requested.group
if (group == 'org.ow2.asm') {
details.useVersion(libs.versions.asm.get())
}
configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
String group = details.requested.group
if (group == 'org.ow2.asm') {
details.useVersion(libs.versions.asm.get())
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

tasks.named("htmlSanityCheck") {
sourceDir = new File("${rootProject.buildDir}/docs/guide/")
sourceDir = file("${rootProject.layout.buildDirectory.asFile.get()}/docs/guide/")
sourceDocuments = fileTree(sourceDir) {
include "index.html"
}
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spotless {
}

def versionInfo = tasks.register("micronautVersionInfo", WriteProperties) {
outputFile = "${buildDir}/resources/version/micronaut-version.properties"
destinationFile = file("${layout.buildDirectory.asFile.get()}/resources/version/micronaut-version.properties")
property 'micronaut.version', projectVersion
}
tasks.named("processResources") {
Expand Down
13 changes: 7 additions & 6 deletions inject-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ dependencies {
api project(":core-processor")

implementation(libs.managed.ksp.api)
if (!JavaVersion.current().isJava9Compatible()) {
api files(org.gradle.internal.jvm.Jvm.current().toolsJar)
}

kspTest(project)
kspTest platform(libs.test.boms.micronaut.validation)
kspTest (libs.micronaut.validation.processor) {
Expand Down Expand Up @@ -57,9 +55,12 @@ afterEvaluate {
}
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "17"
kotlin {
jvmToolchain(17)
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
compilerOptions {
freeCompilerArgs = ['-Xjvm-default=all']
}
}
Expand Down
4 changes: 2 additions & 2 deletions test-suite-http-server-tck-netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ dependencies {
}

configurations {
all {
configureEach {
// Stop serde pulling in AOP
exclude group: 'io.micronaut', module: 'micronaut-aop'
// Stop pulling in inject-groovy from maven
Expand All @@ -48,7 +48,7 @@ graalvmNative {
enabled = true
}
binaries {
all {
configureEach {
resources.autodetect()
}
}
Expand Down
2 changes: 1 addition & 1 deletion test-suite-logback-graalvm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ graalvmNative {
enabled = true
}
binaries {
all {
configureEach {
resources.autodetect()
}
}
Expand Down
2 changes: 1 addition & 1 deletion test-suite-netty-ssl-graalvm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ graalvmNative {
enabled = true
}
binaries {
all {
configureEach {
resources.autodetect()
}
}
Expand Down

0 comments on commit a0a28d6

Please sign in to comment.