File tree Expand file tree Collapse file tree 9 files changed +16
-15
lines changed
buildSrc/src/main/kotlin/software/aws/toolkits/gradle/resources Expand file tree Collapse file tree 9 files changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ open class ValidateMessages : DefaultTask() {
2121 val paths: ConfigurableFileCollection = project.objects.fileCollection()
2222
2323 @OutputFile
24- val output: RegularFileProperty = project.objects.fileProperty().convention {
25- project.buildDir.resolve (" validateMessages" )
26- }
24+ val output: RegularFileProperty = project.objects.fileProperty().convention(
25+ project.layout.buildDirectory.file (" validateMessages" )
26+ )
2727
2828 init {
2929 group = VERIFICATION_GROUP
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
88}
99
1010// mynah build assumes 'build/' belongs to itself, which conflicts with gradle
11- buildDir = file(" gradle_build" )
11+ layout.buildDirectory = file(" gradle_build" )
1212
1313val buildMynahUI = tasks.register<NpmTask >(" buildMynahUI" ) {
1414 dependsOn(tasks.npmInstall)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
1212
1313sourceSets {
1414 main {
15- resources.srcDir(" $buildDir / downloaded-resources" )
15+ resources.srcDir(layout.buildDirectory.dir( " downloaded-resources" ) )
1616 }
1717}
1818
@@ -26,12 +26,13 @@ tasks.test {
2626}
2727
2828val download = tasks.register<Download >(" downloadResources" ) {
29- dest(" $buildDir /downloaded-resources/software/aws/toolkits/resources/" )
29+ val resourcesDir = layout.buildDirectory.dir(" downloaded-resources/software/aws/toolkits/resources/" ).get().asFile
30+ dest(resourcesDir)
3031 src(listOf (" https://idetoolkits.amazonwebservices.com/endpoints.json" ))
3132 onlyIfModified(true )
3233 useETag(true )
3334 doFirst {
34- mkdir(" $buildDir /downloaded-resources/software/aws/toolkits/resources/ " )
35+ mkdir(resourcesDir )
3536 }
3637}
3738
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ plugins {
77
88sdkGenerator {
99 c2jFolder.set(file(" $projectDir /codegen-resources" ))
10- outputDir.set(file( " $buildDir / generated-sources" ))
10+ outputDir.set(layout.buildDirectory.dir( " generated-sources" ).get().asFile )
1111}
1212
1313dependencies {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ plugins {
77 alias(libs.plugins.node.gradle)
88}
99
10- buildDir = file(" gradle_build" )
10+ layout.buildDirectory = file(" gradle_build" )
1111
1212val buildGetStartUI = tasks.register<NpmTask >(" buildWebviewUI" ) {
1313 dependsOn(tasks.npmInstall)
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ dependencies {
4242
4343val changelog = tasks.register<GeneratePluginChangeLog >(" pluginChangeLog" ) {
4444 includeUnreleased.set(true )
45- changeLogFile.set(project.file(" $buildDir / changelog/change-notes.xml" ))
45+ changeLogFile.set(project.layout.buildDirectory. file(" changelog/change-notes.xml" ))
4646}
4747
4848tasks.compileJava {
@@ -113,7 +113,7 @@ val gatewayArtifacts by configurations.creating {
113113 extendsFrom(configurations[" implementation" ], configurations[" runtimeOnly" ])
114114}
115115
116- val gatewayJar = tasks.create <Jar >(" gatewayJar" ) {
116+ val gatewayJar = tasks.register <Jar >(" gatewayJar" ) {
117117 // META-INF/plugin.xml is a duplicate?
118118 // unclear why the exclude() statement didn't work
119119 duplicatesStrategy = DuplicatesStrategy .WARN
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ val toolkitInstallationScripts = tasks.register<Tar>("generateTar") {
137137
138138val gatewayResourcesDir = tasks.register<Sync >(" gatewayResourcesDir" ) {
139139 from(" gateway-resources/caws-proxy-command.bat" , toolkitInstallationScripts)
140- into(" $buildDir / $ name" )
140+ into(layout.buildDirectory.dir( name) )
141141
142142 includeEmptyDirs = false
143143}
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ apply<RdGenPlugin>()
9494tasks.register<RdGenTask >(" generateModels" )
9595
9696val resharperPluginPath = File (projectDir, " ReSharper.AWS" )
97- val resharperBuildPath = File (project.buildDir, " dotnetBuild" )
97+ val resharperBuildPath = layout.buildDirectory.dir( " dotnetBuild" ).get().asFile
9898
9999val resharperParts = listOf (
100100 " AWS.Daemon" ,
@@ -257,7 +257,7 @@ val buildReSharperPlugin = tasks.register("buildReSharperPlugin") {
257257 " normal" ,
258258 " ${resharperPluginPath.canonicalPath} /ReSharper.AWS.sln"
259259 )
260- exec {
260+ project.providers. exec {
261261 executable = " dotnet"
262262 args = arguments
263263 }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ tasks.register<Test>("uiTestCore") {
4545 systemProperty(" junit.jupiter.extensions.autodetection.enabled" , true )
4646
4747 systemProperty(" testDataPath" , project.rootDir.resolve(" testdata" ).toString())
48- systemProperty(" testReportPath" , project.buildDir.resolve (" reports" ).resolve( " tests" ).resolve( " testRecordings " ) .toString())
48+ systemProperty(" testReportPath" , layout.buildDirectory.dir (" reports/ tests/testRecordings " ).get().asFile .toString())
4949
5050 systemProperty(" GRADLE_PROJECT" , " sandbox-all" )
5151 useJUnitPlatform {
You can’t perform that action at this time.
0 commit comments