Skip to content

Commit d1b3e9c

Browse files
committed
Upgrade KGP to 1.8.0
1 parent 0546934 commit d1b3e9c

40 files changed

+134
-131
lines changed

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1717

1818
### Added
1919

20+
### Changed
21+
22+
### Removed
23+
24+
---
25+
26+
## [3.2.0] - 2022-12-28
27+
28+
### Verified Versions
29+
30+
- Kotlin: 1.8.0
31+
- Gradle: 7.5.1
32+
- JDK: 11
33+
34+
### Added
35+
2036
- New [samples](./samples) project containing examples of various use-cases the plugin is able to cover.
2137
- `@DslMarkers` to plugin's DSL to prevent incorrect nested property usage.
2238
- Pull transitive npm dependencies from project dependencies via `publicPackageJson`
2339
- New accessors for assemble and pack tasks inside package DSL
40+
- KGP 1.8.0 support.
2441

2542
### Changed
43+
2644
- Fix #73: `nodeHome` override not working when used with kotlin plugin
2745

2846
### Removed
2947

48+
- Support for KGP < 1.8.0!!! **DO NOT UPGRADE IF YOU'RE ON OLDER KOTLIN VERSION**
49+
3050
---
3151

3252
## [3.1.0] - 2022-11-07
@@ -274,7 +294,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
274294

275295
---
276296

277-
[Unreleased]: https://github.com/mpetuska/npm-publish/compare/3.1.0...HEAD
297+
[Unreleased]: https://github.com/mpetuska/npm-publish/compare/3.2.0...HEAD
298+
299+
[3.2.0]: https://github.com/mpetuska/npm-publish/compare/3.1.0...3.2.0
278300

279301
[3.1.0]: https://github.com/mpetuska/npm-publish/compare/3.0.1...3.1.0
280302

buildSrc/build.gradle.kts renamed to build-conventions/build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ repositories {
99
}
1010

1111
dependencies {
12-
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$embeddedKotlinVersion")
13-
implementation("org.jetbrains.dokka:dokka-gradle-plugin:$embeddedKotlinVersion")
12+
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:_")
13+
implementation("org.jetbrains.dokka:dokka-gradle-plugin:_")
1414
implementation("com.github.jakemarsden:git-hooks-gradle-plugin:_")
1515
implementation("com.gradle.publish:plugin-publish-plugin:_")
1616
implementation("io.github.gradle-nexus:publish-plugin:_")
1717
implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:_")
1818
implementation("dev.petuska:container-tasks-gradle-plugin:_")
1919
}
20+
21+
gradleEnterprise {
22+
buildScan {
23+
termsOfServiceUrl = "https://gradle.com/terms-of-service"
24+
termsOfServiceAgree = "yes"
25+
}
26+
}

build-conventions/gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../gradle
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
plugins {
2+
id("de.fayard.refreshVersions") version "0.40.1"
3+
id("com.gradle.enterprise") version "3.8.1"
4+
}
5+
6+
enableFeaturePreview("STABLE_CONFIGURATION_CACHE")
7+
8+
refreshVersions {
9+
versionsPropertiesFile = rootDir.resolve("gradle/versions.properties")
10+
extraArtifactVersionKeyRules(rootDir.resolve("gradle/versions.rules"))
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
plugins {
2+
idea
3+
}
4+
5+
idea {
6+
module {
7+
isDownloadJavadoc = true
8+
isDownloadSources = true
9+
}
10+
}
11+
12+
repositories {
13+
mavenLocal()
14+
mavenCentral()
15+
gradlePluginPortal()
16+
}

buildSrc/src/main/kotlin/plugin.base.gradle.kts renamed to build-conventions/src/main/kotlin/convention.detekt.gradle.kts

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,18 @@ import io.gitlab.arturbosch.detekt.Detekt
22

33
plugins {
44
id("io.gitlab.arturbosch.detekt")
5-
idea
65
}
76

87
dependencies {
98
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:_")
109
}
1110

1211
detekt {
13-
config.from(rootDir.resolve("detekt.yml"))
12+
config.from(rootDir.resolve("gradle/detekt.yml"))
1413
buildUponDefaultConfig = true
1514
}
1615

17-
idea {
18-
module {
19-
isDownloadJavadoc = true
20-
isDownloadSources = true
21-
}
22-
}
23-
24-
repositories {
25-
mavenLocal()
26-
mavenCentral()
27-
gradlePluginPortal()
28-
}
29-
30-
tasks.withType<Detekt>().configureEach {
16+
tasks.withType<Detekt> {
3117
reports {
3218
html.required.set(true) // observe findings in your browser with structure and code snippets
3319
xml.required.set(true) // checkstyle like format mainly for integrations like Jenkins
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
22

33
plugins {
4-
id("plugin.base")
4+
id("convention.detekt")
5+
id("convention.base")
56
kotlin("jvm")
67
}
78

89
tasks {
9-
withType<KotlinCompile>().configureEach {
10+
withType<KotlinCompile> {
1011
kotlinOptions {
1112
languageVersion = "1.4"
13+
kotlinOptions {
14+
jvmTarget = "11"
15+
}
1216
}
1317
}
14-
withType<Test>().configureEach {
18+
withType<Test> {
1519
useJUnitPlatform()
1620
}
1721
}

buildSrc/src/main/kotlin/plugin.publishing.gradle.kts renamed to build-conventions/src/main/kotlin/convention.publishing.gradle.kts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,16 @@ java {
7474
}
7575

7676
tasks {
77-
withType<Test> {
78-
useJUnitPlatform()
79-
}
8077
withType<Jar> {
8178
manifest {
82-
attributes +=
83-
sortedMapOf(
84-
"Built-By" to System.getProperty("user.name"),
85-
"Build-Jdk" to System.getProperty("java.version"),
86-
"Build-Kotlin" to embeddedKotlinVersion,
87-
"Implementation-Version" to project.version,
88-
"Created-By" to GradleVersion.current(),
89-
"Created-From" to Git.headCommitHash
90-
)
79+
attributes += sortedMapOf(
80+
"Built-By" to System.getProperty("user.name"),
81+
"Build-Jdk" to System.getProperty("java.version"),
82+
"Build-Kotlin" to embeddedKotlinVersion,
83+
"Implementation-Version" to project.version,
84+
"Created-By" to GradleVersion.current(),
85+
"Created-From" to Git.headCommitHash
86+
)
9187
}
9288
}
9389
}

0 commit comments

Comments
 (0)