diff --git a/build.gradle.kts b/build.gradle.kts index 9d029d2395..df6783e34a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,7 +26,7 @@ dependencies { val copyAgentTask = project.tasks.register("copyAgent") { from(agentDeps) - into("${project.buildDir}/agent") + into("${project.layout.buildDirectory}/agent") rename("applicationinsights-agent(.+).jar", "agent.jar") } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 1e0e7cca2e..eb38babb9b 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,6 +1,6 @@ plugins { id("com.google.cloud.tools.jib") version "3.4.0" apply false - id("org.sonarqube") version "4.2.1.3168" apply false + id("org.sonarqube") version "4.4.1.3373" apply false `kotlin-dsl` } @@ -12,5 +12,5 @@ repositories { dependencies { implementation("com.google.cloud.tools:jib-gradle-plugin:3.4.0") - implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.2.1.3168") + implementation("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373") } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/ClassPathPlugin.kt b/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/ClassPathPlugin.kt index 2dc52ac631..ee448050fc 100644 --- a/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/ClassPathPlugin.kt +++ b/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/ClassPathPlugin.kt @@ -45,7 +45,7 @@ class ClassPathPlugin : Plugin { classDirectories.files.map { project.fileTree(it) { exclude(extension.jacocoExclusions) } } ) ) - executionData.setFrom(project.fileTree(project.buildDir).include("/jacoco/*.exec")) + executionData.setFrom(project.fileTree(project.layout.buildDirectory).include("/jacoco/*.exec")) reports { html.required.set(true) xml.required.set(true) diff --git a/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt b/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt index e9854d7f7b..814c77be94 100644 --- a/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt +++ b/buildSrc/src/main/kotlin/uk/gov/justice/digital/hmpps/plugins/JibConfigPlugin.kt @@ -30,11 +30,11 @@ class JibConfigPlugin : Plugin { extraDirectories { paths { path { - setFrom("${project.rootProject.buildDir}") + setFrom("${project.rootProject.layout.buildDirectory}") includes.add("agent/agent.jar") } path { - setFrom("${project.buildDir}/agent") + setFrom("${project.layout.buildDirectory}/agent") includes.add("applicationinsights*.json") into = "/agent" } @@ -45,7 +45,7 @@ class JibConfigPlugin : Plugin { val copyAgent = project.rootProject.tasks.named("copyAgent") val copyAppInsightsConfig = project.tasks.register("copyAppInsightsConfig") { from("${project.projectDir}/applicationinsights.json") - into("${project.buildDir}/agent") + into("${project.layout.buildDirectory}/agent") } val assemble = project.tasks.named("assemble") project.tasks.withType().named("jib") { @@ -70,13 +70,13 @@ class JibConfigPlugin : Plugin { dependsOn(copyAgent, copyAppInsightsConfig, assemble) inputs.dir("deploy") inputs.files( - "${project.buildDir}/agent", - "${project.buildDir}/classes", - "${project.buildDir}/generated", - "${project.buildDir}/resources", + "${project.layout.buildDirectory}/agent", + "${project.layout.buildDirectory}/classes", + "${project.layout.buildDirectory}/generated", + "${project.layout.buildDirectory}/resources", project.configurations[jib!!.configurationName.get()].resolvedConfiguration.files ) - outputs.file("${project.buildDir}/jib-image.id") + outputs.file("${project.layout.buildDirectory}/jib-image.id") outputs.cacheIf { true } } } diff --git a/gradle.properties b/gradle.properties index 68dc472adf..183b929d11 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ org.gradle.caching=true org.gradle.parallel=true -org.gradle.jvmargs=-Xmx4g "-XX:MaxMetaspaceSize=384m" +org.gradle.jvmargs=-Xmx4g "-XX:MaxMetaspaceSize=1g" systemProp.sonar.host.url=https://sonarcloud.io systemProp.sonar.organization=ministryofjustice systemProp.sonar.projectKey=ministryofjustice_hmpps-probation-integration-services