Skip to content

Commit e7b46ff

Browse files
committed
chore: build-logic changes
1 parent ef57c2d commit e7b46ff

File tree

18 files changed

+86
-81
lines changed

18 files changed

+86
-81
lines changed

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -120,38 +120,38 @@ $ actionlint
120120

121121
```mermaid
122122
%%{
123-
init: {
124-
'theme': 'neutral'
125-
}
123+
init: {
124+
'theme': 'neutral'
125+
}
126126
}%%
127127
128128
graph LR
129129
130-
subgraph compose
131-
desktop
132-
web
133-
end
134-
subgraph dep-mgmt
135-
bom
136-
catalog
137-
end
138-
subgraph devtools
139-
compiler
140-
ksp
141-
end
142-
subgraph compiler
143-
compiler
144-
plugin
145-
end
146-
subgraph ksp
147-
ksp
148-
processor
149-
end
150-
web --> common
151-
web --> common
152-
desktop --> common
153-
backend --> common
154-
web --> common
155-
benchmarks --> common
130+
subgraph compose
131+
desktop
132+
web
133+
end
134+
subgraph dep-mgmt
135+
bom
136+
catalog
137+
end
138+
subgraph devtools
139+
compiler
140+
ksp
141+
end
142+
subgraph compiler
143+
compiler
144+
plugin
145+
end
146+
subgraph ksp
147+
ksp
148+
processor
149+
end
150+
web --> common
151+
web --> common
152+
desktop --> common
153+
backend --> common
154+
web --> common
155+
benchmarks --> common
156156
157157
```

common/src/commonMain/kotlin/dev/suresh/Greeting.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ class Greeting {
2222

2323
fun greeting() =
2424
"""
25-
| Platform : Kotlin $platform
26-
| Build Time : ${BuildConfig.buildTime}
27-
| Build Version : ${BuildConfig.version}
28-
| Java Version : ${BuildConfig.java}
29-
| Kotlin Version : ${KotlinVersion.CURRENT}
30-
| Gradle Version : ${BuildConfig.gradle}
31-
| Git Hash : ${BuildConfig.gitHash}
32-
| Git Message : ${BuildConfig.gitMessage}
33-
| Git Tag : ${BuildConfig.gitTags}
25+
| Platform : Kotlin $platform
26+
| Build Time (UTC) : ${BuildConfig.buildTimeUTC}
27+
| Build Version : ${BuildConfig.version}
28+
| Java Version : ${BuildConfig.java}
29+
| Kotlin Version : ${KotlinVersion.CURRENT}
30+
| Gradle Version : ${BuildConfig.gradle}
31+
| Git Hash : ${BuildConfig.gitHash}
32+
| Git Message : ${BuildConfig.gitMessage}
33+
| Git Tag : ${BuildConfig.gitTags}
3434
| ${KData("Foo", 20, "test")}
3535
| ${kotlinxTests()}
3636
"""

gradle/build-logic/common-plugins/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ dependencies {
102102
implementation(platform(libs.kotlin.bom))
103103
implementation(kotlin("stdlib"))
104104
implementation(libs.kotlinx.coroutines.core)
105+
implementation(libs.kotlinx.datetime)
105106
// Http client and JSON serialization
106107
implementation(libs.ktor.client.java)
107108
implementation(libs.ktor.client.content.negotiation)

gradle/build-logic/common-plugins/src/main/kotlin/plugins/DepReportsPlugin.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ class DepReportsPlugin : Plugin<Project> {
2929
val resolvedArtifacts = runtimeClasspath.incoming.artifacts.resolvedArtifacts
3030

3131
// Transform the artifacts
32-
artifactIds.set(resolvedArtifacts.map { it.map(ResolvedArtifactResult::getId) })
33-
artifactVariants.set(
34-
resolvedArtifacts.map { it.map(ResolvedArtifactResult::getVariant) })
35-
artifactFiles.set(
32+
artifactIds = resolvedArtifacts.map { it.map(ResolvedArtifactResult::getId) }
33+
artifactVariants =
34+
resolvedArtifacts.map { it.map(ResolvedArtifactResult::getVariant) }
35+
artifactFiles =
3636
resolvedArtifacts.map {
3737
it.map { resolvedArtifactResult ->
3838
layout.projectDirectory.file(resolvedArtifactResult.file.absolutePath)
3939
}
40-
})
40+
}
4141
outputFile.convention(layout.buildDirectory.file("resolved-artifacts.txt"))
4242
}
4343
}
@@ -68,10 +68,10 @@ abstract class ListResolvedArtifacts : DefaultTask() {
6868
ids.forEachIndexed { idx, id ->
6969
val variant = variants[idx]
7070
val file = files[idx]
71-
it.appendLine("FILE ${file.asFile.name}")
72-
it.appendLine(" id: ${id.displayName}")
73-
it.appendLine(" variant: ${variant.displayName}")
74-
it.appendLine(" size: ${file.asFile.length()}")
71+
it.appendLine("File - ${file.asFile.name}")
72+
it.appendLine(" Id : ${id.displayName}")
73+
it.appendLine(" Variant : ${variant.displayName}")
74+
it.appendLine(" Size : ${file.asFile.length()}")
7575
it.appendLine()
7676
}
7777
}

gradle/build-logic/common-plugins/src/main/kotlin/plugins/common.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import tasks.*
1313
plugins {
1414
idea
1515
application
16-
id("com.github.johnrengelman.shadow")
16+
com.github.johnrengelman.shadow
1717
id("plugins.kotlin.docs")
1818
id("plugins.publishing")
1919
}

gradle/build-logic/common-plugins/src/main/kotlin/plugins/graalvm.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ plugins {
1010
application
1111
id("plugins.kotlin.jvm")
1212
id("plugins.misc")
13-
id("org.graalvm.buildtools.native")
14-
id("com.autonomousapps.dependency-analysis")
13+
org.graalvm.buildtools.native
14+
com.autonomousapps.`dependency-analysis`
1515
}
1616

1717
val debugEnabled = project.hasProperty("debug")

gradle/build-logic/common-plugins/src/main/kotlin/plugins/kotlin.benchmark.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
1515
*/
1616
plugins {
1717
id("plugins.kotlin.mpp")
18-
id("org.jetbrains.kotlinx.benchmark")
19-
id("org.jetbrains.kotlin.plugin.allopen")
18+
org.jetbrains.kotlinx.benchmark
19+
`kotlin-allopen`
2020
}
2121

2222
description = "Kotlin benchmarking tests"

gradle/build-logic/common-plugins/src/main/kotlin/plugins/kotlin.docs.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
99
import org.jetbrains.dokka.gradle.DokkaTaskPartial
1010

1111
plugins {
12-
id("org.jetbrains.dokka")
13-
id("org.jetbrains.kotlinx.kover")
14-
id("test-report-aggregation")
12+
org.jetbrains.dokka
13+
org.jetbrains.kotlinx.kover
14+
`test-report-aggregation`
1515
}
1616

1717
// The following plugins and config apply only to a root project.

gradle/build-logic/common-plugins/src/main/kotlin/plugins/kotlin.jvm.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
88

99
plugins {
1010
`java-library`
11-
id("com.google.devtools.ksp")
11+
com.google.devtools.ksp
1212
kotlin("jvm")
13-
kotlin("plugin.serialization")
14-
id("kotlinx-atomicfu")
15-
id("dev.zacsweers.redacted")
13+
`kotlinx-serialization`
14+
`kotlinx-atomicfu`
15+
dev.zacsweers.redacted
1616
id("plugins.kotlin.docs")
1717
// `test-suite-base`
1818
}

gradle/build-logic/common-plugins/src/main/kotlin/plugins/kotlin.mpp.gradle.kts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ import tasks.BuildConfigExtension
1414

1515
plugins {
1616
java
17-
kotlin("plugin.serialization")
18-
id("com.google.devtools.ksp")
19-
id("kotlinx-atomicfu")
20-
id("dev.zacsweers.redacted")
17+
`kotlinx-serialization`
18+
com.google.devtools.ksp
19+
`kotlinx-atomicfu`
20+
dev.zacsweers.redacted
21+
app.cash.molecule
2122
id("plugins.kotlin.docs")
22-
id("app.cash.molecule")
23-
// id("dev.petuska.npm.publish")
24-
// id("dev.mokkery")
23+
// dev.petuska.npm.publish
24+
// dev.mokkery
2525
}
2626

2727
// Workaround for "The root project is not yet available for build" error.

0 commit comments

Comments
 (0)