Skip to content

Commit 69cb7b7

Browse files
committed
wip
1 parent e4b5cbe commit 69cb7b7

File tree

15 files changed

+91
-112
lines changed

15 files changed

+91
-112
lines changed

buildSrc/build.gradle.kts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
4-
buildscript {
5-
// This has to be here otherwise properties are not loaded and nothing works
6-
val props = `java.util`.Properties()
7-
file("${project.projectDir.parent}/gradle.properties").inputStream().use { props.load(it) }
8-
props.entries.forEach { project.extensions.add(it.key.toString(), it.value) }
9-
}
10-
113
plugins {
124
`kotlin-dsl`
135
`java-gradle-plugin`

buildSrc/src/main/kotlin/software/aws/toolkits/gradle/changelog/tasks/CreateRelease.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ open class CreateRelease @Inject constructor(projectLayout: ProjectLayout) : Cha
2727

2828
@Input
2929
@Optional
30-
val issuesUrl: Provider<String?> = project.objects.property(String::class.java).convention("https://github.com/aws/aws-toolkit-jetbrains/issues")
30+
val issuesUrl: Provider<String> = project.objects.property(String::class.java).convention("https://github.com/aws/aws-toolkit-jetbrains/issues")
3131

3232
@OutputFile
3333
val releaseFile: RegularFileProperty = project.objects.fileProperty().convention(changesDirectory.file(releaseVersion.map { "$it.json" }))

buildSrc/src/main/kotlin/software/aws/toolkits/gradle/changelog/tasks/GenerateChangeLog.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import software.aws.toolkits.gradle.changelog.JetBrainsWriter
1818
abstract class GenerateChangeLog(private val shouldStage: Boolean) : ChangeLogTask() {
1919
@Input
2020
@Optional
21-
val repoUrl: Provider<String?> = project.objects.property(String::class.java).convention("https://github.com/aws/aws-toolkit-jetbrains")
21+
val repoUrl: Provider<String> = project.objects.property(String::class.java).convention("https://github.com/aws/aws-toolkit-jetbrains")
2222

2323
@Input
2424
val includeUnreleased: Property<Boolean> = project.objects.property(Boolean::class.java).convention(false)

buildSrc/src/main/kotlin/software/aws/toolkits/gradle/changelog/tasks/NewChange.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ open class NewChange : ChangeLogTask() {
1919
@TaskAction
2020
fun create() {
2121
val changeType = if (project.hasProperty("changeType")) {
22-
(project.property("changeType") as? String?)?.toUpperCase()?.let { ChangeType.valueOf(it) }
22+
(project.property("changeType") as? String?)?.uppercase()?.let { ChangeType.valueOf(it) }
2323
} else defaultChangeType
2424
val description = if (project.hasProperty("description")) {
2525
project.property("description") as? String?

buildSrc/src/main/kotlin/toolkit-git-secrets.gradle.kts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,41 @@ plugins {
88
id("de.undercouch.download")
99
}
1010

11-
val downloadGitSecrets = tasks.register<Download>("downloadGitSecrets") {
12-
src("https://raw.githubusercontent.com/awslabs/git-secrets/master/git-secrets")
13-
dest("$buildDir/git-secrets")
14-
onlyIfModified(true)
15-
useETag(true)
16-
}
17-
18-
val gitSecrets = tasks.register<Exec>("gitSecrets") {
19-
onlyIf {
20-
!DefaultNativePlatform.getCurrentOperatingSystem().isWindows
21-
}
22-
23-
dependsOn(downloadGitSecrets)
24-
workingDir(project.rootDir)
25-
val path = "$buildDir${File.pathSeparator}"
26-
val patchendEnv = environment.apply { replace("PATH", path + getOrDefault("PATH", "")) }
27-
environment = patchendEnv
28-
29-
commandLine("/bin/sh", "$buildDir/git-secrets", "--register-aws")
30-
31-
// cleaner than having multiple separate exec tasks
32-
doLast {
33-
exec {
34-
workingDir(project.rootDir)
35-
commandLine("git", "config", "--add", "secrets.allowed", "123456789012")
36-
}
37-
38-
exec {
39-
workingDir(project.rootDir)
40-
environment = patchendEnv
41-
commandLine("/bin/sh", "$buildDir/git-secrets", "--scan")
42-
}
43-
}
44-
}
45-
46-
tasks.findByName("check")?.let {
47-
it.dependsOn(gitSecrets)
48-
}
11+
//val downloadGitSecrets = tasks.register<Download>("downloadGitSecrets") {
12+
// src("https://raw.githubusercontent.com/awslabs/git-secrets/master/git-secrets")
13+
// dest("$buildDir/git-secrets")
14+
// onlyIfModified(true)
15+
// useETag(true)
16+
//}
17+
//
18+
//val gitSecrets = tasks.register<Exec>("gitSecrets") {
19+
// onlyIf {
20+
// !DefaultNativePlatform.getCurrentOperatingSystem().isWindows
21+
// }
22+
//
23+
// dependsOn(downloadGitSecrets)
24+
// workingDir(project.rootDir)
25+
// val path = "$buildDir${File.pathSeparator}"
26+
// val patchendEnv = environment.apply { replace("PATH", path + getOrDefault("PATH", "")) }
27+
// environment = patchendEnv
28+
//
29+
// commandLine("/bin/sh", "$buildDir/git-secrets", "--register-aws")
30+
//
31+
// // cleaner than having multiple separate exec tasks
32+
// doLast {
33+
// exec {
34+
// workingDir(project.rootDir)
35+
// commandLine("git", "config", "--add", "secrets.allowed", "123456789012")
36+
// }
37+
//
38+
// exec {
39+
// workingDir(project.rootDir)
40+
// environment = patchendEnv
41+
// commandLine("/bin/sh", "$buildDir/git-secrets", "--scan")
42+
// }
43+
// }
44+
//}
45+
//
46+
//tasks.findByName("check")?.let {
47+
// it.dependsOn(gitSecrets)
48+
//}

buildSrc/src/main/kotlin/toolkit-integration-testing.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ val testJar = tasks.named<Jar>("testJar").configure {
5555

5656
idea {
5757
module {
58-
testSourceDirs = testSourceDirs + integrationTests.java.srcDirs
59-
testResourceDirs = testResourceDirs + integrationTests.resources.srcDirs
58+
testSources.from(integrationTests.java.srcDirs)
59+
testResources.from(integrationTests.resources.srcDirs)
6060
}
6161
}
6262
val integrationTestConfiguration: Test.() -> Unit = {

buildSrc/src/main/kotlin/toolkit-publishing-conventions.gradle.kts

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0
3-
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
4-
import org.jetbrains.intellij.platform.gradle.tasks.BuildPluginTask
5-
import org.jetbrains.intellij.platform.gradle.tasks.PatchPluginXmlTask
63
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask
74
import software.aws.toolkits.gradle.buildMetadata
85
import software.aws.toolkits.gradle.intellij.IdeVersions
@@ -18,19 +15,13 @@ val toolkitVersion: String by project
1815
// please check changelog generation logic if this format is changed
1916
version = "$toolkitVersion.${ideProfile.shortName}"
2017

21-
// attach the current commit hash on local builds
22-
if (!project.isCi()) {
23-
val buildMetadata = buildMetadata()
24-
tasks.withType<PatchPluginXmlTask>().configureEach {
25-
pluginVersion.set(buildMetadata.map { "${project.version}+$it" })
18+
intellijPlatform {
19+
pluginConfiguration {
20+
if (isCi()) {
21+
version.set(buildMetadata().map { "${project.version}+$it" })
22+
}
2623
}
2724

28-
tasks.named<BuildPluginTask>("buildPlugin") {
29-
archiveClassifier.set(buildMetadata)
30-
}
31-
}
32-
33-
intellijPlatform {
3425
publishing {
3526
val publishToken: String by project
3627
val publishChannel: String by project

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ kotlin.build.report.output=file
3030
# don't bundle Kotlin stdlib with plugin
3131
kotlin.stdlib.default.dependency=false
3232

33-
#org.gradle.configuration-cache=true
33+
org.gradle.configuration-cache=true
3434
#org.gradle.configuration-cache.problems=warn

gradle/wrapper/gradle-wrapper.jar

122 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)