Skip to content

Commit 1a38e28

Browse files
committed
chore: misc cleanups
1 parent a5a01a0 commit 1a38e28

File tree

6 files changed

+23
-56
lines changed

6 files changed

+23
-56
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,11 @@ jobs:
115115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
116116
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
117117
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
118-
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_SECRET_KEY_ID }}
119-
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
120-
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SECRET_KEY_PASSWORD }}
121-
ORG_GRADLE_PROJECT_githubActor: ${{ github.actor }}
122-
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}
123-
# JOB_CONTEXT: ${{ toJSON(job) }}
124-
# STEPS_CONTEXT: ${{ toJSON(steps) }}
125-
# RUNNER_CONTEXT: ${{ toJSON(runner) }}
126-
# GITHUB_CONTEXT: ${{ toJSON(github) }}
127-
# STRATEGY_CONTEXT: ${{ toJSON(strategy) }}
128-
# MATRIX_CONTEXT: ${{ toJSON(matrix) }}
118+
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_PRIVATE_KEY_ID }}
119+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
120+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PRIVATE_KEY_PASSWORD }}
121+
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
122+
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
129123

130124
- name: 📤 Uploading ${{ matrix.os }} build artifacts
131125
if: steps.gradle-build.outcome == 'success' && runner.os == 'Linux'
@@ -171,7 +165,7 @@ jobs:
171165
uses: JamesIves/[email protected]
172166
with:
173167
branch: gh-pages
174-
folder: build/reports/tests/test
168+
folder: build/reports/allTests
175169
target-folder: tests
176170
clean: true
177171
commit-message: 'report: Deployed test results'

compose/cmp/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@file:OptIn(ExperimentalComposeLibrary::class)
2+
@file:Suppress("UnstableApiUsage")
23

34
import common.Platform
45
import common.jvmArguments

gradle/build-logic/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ jte {
136136
}
137137

138138
dependencies {
139-
// Hack to access version catalog from pre-compiled script plugins.
140-
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
141-
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
142139
implementation(platform(libs.kotlin.bom))
143140
implementation(libs.kotlin.stdlib)
144141
implementation(libs.kotlinx.coroutines.core)
@@ -194,6 +191,9 @@ dependencies {
194191
implementation(libs.build.kopy.plugin)
195192
implementation(libs.build.tomlj)
196193

194+
// https://github.com/gradle/gradle/issues/15383#issuecomment-779893192
195+
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
196+
197197
// implementation(libs.build.kotlin.compose.compiler)
198198
// implementation(libs.build.karakum.plugin)
199199
// implementation(libs.jte.native)

gradle/build-logic/src/main/kotlin/dev.suresh.plugin.kotlin.docs.gradle.kts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,17 @@ import org.jetbrains.dokka.base.DokkaBase
66
import org.jetbrains.dokka.base.DokkaBaseConfiguration
77
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
88
import org.jetbrains.dokka.gradle.DokkaTaskPartial
9-
import org.jetbrains.kotlin.gradle.tasks.KotlinTest
109

1110
plugins {
1211
org.jetbrains.dokka
1312
com.diffplug.spotless
14-
`test-report-aggregation`
13+
// `test-report-aggregation`
1514
}
1615

1716
// The following plugins and config apply only to a root project.
1817
if (isRootProject) {
1918
apply(plugin = "org.hildan.github.changelog")
2019

21-
// Combined test report
22-
dependencies {
23-
allprojects.filter { !it.path.contains(":dep-mgmt") }.forEach { testReportAggregation(it) }
24-
}
25-
2620
// Dokka multi-module config.
2721
tasks.withType<DokkaMultiModuleTask>().configureEach {
2822
description = project.description.orEmpty()
@@ -43,10 +37,12 @@ if (isRootProject) {
4337
// Combined test reports
4438
val allTestReports by
4539
tasks.registering(TestReport::class) {
46-
destinationDirectory = layout.buildDirectory.dir("reports/tests/test")
47-
allprojects.forEach {
48-
testResults.from(it.tasks.withType<Test>(), it.tasks.withType<KotlinTest>())
49-
}
40+
group = LifecycleBasePlugin.VERIFICATION_GROUP
41+
description = "Generates aggregated test report for all tests."
42+
destinationDirectory = layout.buildDirectory.dir("reports/allTests")
43+
44+
// Include the results from the `test` task in all subprojects
45+
allprojects.forEach { testResults.from(it.tasks.withType<AbstractTestTask>()) }
5046

5147
doLast {
5248
logger.lifecycle("All test reports are aggregated in ${destinationDirectory.get()}")

gradle/build-logic/src/main/kotlin/dev.suresh.plugin.kotlin.mpp.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ tasks {
112112

113113
withType<KotlinNpmInstallTask>().configureEach { configureKotlinNpm() }
114114

115-
// withType<KotlinJsCompile>().configureEach { }
115+
// withType<Kotlin2JsCompile>().configureEach {}
116116

117117
withType<Jar>().configureEach {
118118
manifest {

gradle/build-logic/src/main/kotlin/dev.suresh.plugin.publishing.gradle.kts

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@ plugins {
88
`maven-publish`
99
signing
1010
com.gradleup.nmcp
11-
// org.cyclonedx.bom
12-
}
13-
14-
// Nexus plugin needs to apply to the root project only
15-
if (isRootProject) {
16-
apply(plugin = "io.github.gradle-nexus.publish-plugin")
17-
18-
nmcp {
19-
publishAggregation {
20-
username = mavenCentralUsername
21-
password = mavenCentralPassword
22-
publicationType = "AUTOMATIC"
23-
}
24-
}
2511
}
2612

2713
group = libs.versions.group.get()
@@ -37,9 +23,8 @@ publishing {
3723
name = "GitHubPackages"
3824
url = uri(githubPackage(libs.versions.dev.name.get(), rootProject.name))
3925
credentials {
40-
// findProperty("githubActor")
41-
username = githubActor.orNull ?: System.getenv("GITHUB_ACTOR")
42-
password = githubToken.orNull ?: System.getenv("GITHUB_TOKEN")
26+
username = githubPackagesUsername.orNull
27+
password = githubPackagesPassword.orNull
4328
}
4429
}
4530
}
@@ -113,8 +98,8 @@ pluginManager.withPlugin("com.google.cloud.tools.jib") {
11398
to {
11499
if (image.orEmpty().startsWith("ghcr.io", ignoreCase = true)) {
115100
auth {
116-
username = githubActor.orNull ?: System.getenv("GITHUB_ACTOR")
117-
password = githubToken.orNull ?: System.getenv("GITHUB_TOKEN")
101+
username = githubPackagesUsername.orNull
102+
password = githubPackagesPassword.orNull
118103
}
119104
}
120105
}
@@ -125,9 +110,8 @@ signing {
125110
setRequired { hasSigningKey }
126111
if (hasSigningKey) {
127112
useInMemoryPgpKeys(signingKeyId.orNull, signingKey.orNull, signingPassword.orNull)
113+
sign(publishing.publications)
128114
}
129-
sign(publishing.publications)
130-
// gradle.taskGraph.allTasks.any { it.name.startsWith("publish") }
131115
}
132116

133117
nmcp {
@@ -179,12 +163,4 @@ tasks {
179163

180164
// For publishing kotlin native binaries
181165
withType<AbstractPublishToMaven>().configureEach { mustRunAfter(withType<KotlinNativeLink>()) }
182-
183-
// cyclonedxBom {
184-
// includeConfigs = listOf("runtimeClasspath")
185-
// skipConfigs = listOf("compileClasspath", "testCompileClasspath")
186-
// destination = project.layout.buildDirectory.dir("sbom").map { it.asFile }
187-
// outputFormat = "json"
188-
// includeLicenseText = true
189-
// }
190166
}

0 commit comments

Comments
 (0)