Skip to content

Commit d5b4bda

Browse files
committed
release: v0.2.6
1 parent 3f916d7 commit d5b4bda

File tree

6 files changed

+85
-62
lines changed

6 files changed

+85
-62
lines changed

build.gradle.kts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1+
import love.forte.gradle.common.core.project.setup
2+
13
buildscript {
24
extra["kotlin_plugin_id"] = "love.forte.plugin.suspend-transform"
35
}
46

5-
group = IProject.GROUP
6-
version = IProject.version.toString()
7-
description = IProject.DESCRIPTION
7+
setup(IProject)
88

99
allprojects {
10-
group = IProject.GROUP
11-
version = IProject.version.toString()
12-
description = IProject.DESCRIPTION
10+
setup(IProject)
1311

1412
repositories {
1513
mavenCentral()
1614
gradlePluginPortal()
17-
mavenLocal()
15+
//mavenLocal()
1816
//maven {
1917
// url = URI("")
2018
//}
2119
}
2220
this.tasks.withType<JavaCompile> {
2321
sourceCompatibility = "1.8"
2422
targetCompatibility = "1.8"
23+
options.encoding = "UTF-8"
2524
}
2625
this.tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
2726
kotlinOptions.jvmTarget = "1.8"

buildSrc/src/main/kotlin/IProject.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object IProject : ProjectDetail() {
88
const val DESCRIPTION = "Generate platform-compatible functions for Kotlin suspend functions"
99
const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin"
1010

11-
override val version: Version = version(0, 2, 5)
11+
override val version: Version = version(0, 2, 6)
1212

1313
override val homepage: String get() = HOMEPAGE
1414

buildSrc/src/main/kotlin/R.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import love.forte.gradle.common.core.repository.Repositories
1414
import love.forte.gradle.common.core.repository.SimpleCredentials
1515
import org.slf4j.LoggerFactory
1616

17-
val logger = LoggerFactory.getLogger("Sonatype Userinfo")
17+
val logger = LoggerFactory.getLogger("R.sonatype.userinfo")
1818

1919

2020
private val sonatypeUserInfo0 by lazy {

buildSrc/src/main/kotlin/suspend-transform.jvm-maven-publish.gradle.kts

Lines changed: 68 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,90 @@
1+
import love.forte.gradle.common.core.Gpg
2+
import love.forte.gradle.common.core.project.setup
3+
import love.forte.gradle.common.publication.configure.jvmConfigPublishing
4+
15
plugins {
26
id("org.jetbrains.dokka")
37
signing
48
`maven-publish`
59
}
610

7-
// val dokkaJar by tasks.creating(Jar::class) {
8-
// group = DOCUMENTATION_GROUP
9-
// description = "Assembles Kotlin docs with Dokka"
10-
// archiveClassifier.set("javadoc")
11-
// from(tasks["dokkaHtml"])
12-
// }
13-
11+
setup(IProject)
1412

1513
val (sonatypeUsername, sonatypePassword) = sonatypeUserInfoOrNull
1614

1715
val sonatypeContains = sonatypeUserInfoOrNull != null
1816

19-
val jarJavadoc by tasks.registering(Jar::class) {
20-
archiveClassifier.set("javadoc")
21-
// from(tasks.findByName("dokkaHtml"))
22-
}
17+
//val jarJavadoc by tasks.registering(Jar::class) {
18+
// archiveClassifier.set("javadoc")
19+
// // from(tasks.findByName("dokkaHtml"))
20+
//}
21+
//
22+
//val jarSources by tasks.registering(Jar::class) {
23+
// archiveClassifier.set("sources")
24+
// from(sourceSets["main"].allSource)
25+
//}
2326

24-
val jarSources by tasks.registering(Jar::class) {
25-
archiveClassifier.set("sources")
26-
from(sourceSets["main"].allSource)
27-
}
27+
val p = project
2828

29-
publishing {
30-
publications {
31-
create<MavenPublication>("suspendTransformJvmDist") {
32-
from(components["java"])
33-
artifact(jarSources)
34-
artifact(jarJavadoc)
29+
jvmConfigPublishing {
30+
project = IProject
31+
val jarSources by tasks.registering(Jar::class) {
32+
archiveClassifier.set("sources")
33+
from(sourceSets["main"].allSource)
34+
}
3535

36-
groupId = project.group.toString()
37-
artifactId = project.name
38-
version = project.version.toString()
39-
}
36+
val jarJavadoc by tasks.registering(Jar::class) {
37+
dependsOn(tasks.dokkaJavadoc)
38+
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
39+
archiveClassifier.set("javadoc")
40+
}
4041

41-
configureEach {
42-
if (this is MavenPublication) {
43-
pom {
44-
setupPom(project)
45-
}
46-
}
47-
}
42+
artifact(jarSources)
43+
artifact(jarJavadoc)
4844

49-
repositories {
50-
mavenCentral()
51-
if (sonatypeContains) {
52-
if (project.version.toString().contains("SNAPSHOT", true)) {
53-
configPublishMaven(Sonatype.Snapshot, sonatypeUsername, sonatypePassword)
54-
} else {
55-
configPublishMaven(Sonatype.Central, sonatypeUsername, sonatypePassword)
56-
}
57-
}
58-
mavenLocal()
59-
}
60-
}
45+
isSnapshot = p.version.toString().contains("SNAPSHOT", true)
46+
releasesRepository = ReleaseRepository
47+
snapshotRepository = SnapshotRepository
48+
gpg = Gpg.ofSystemPropOrNull()
6149
}
6250

6351

64-
signing {
65-
setupSigning(publishing.publications)
66-
}
52+
//publishing {
53+
// publications {
54+
// create<MavenPublication>("suspendTransformJvmDist") {
55+
// from(components["java"])
56+
// artifact(jarSources)
57+
// artifact(jarJavadoc)
58+
//
59+
// groupId = project.group.toString()
60+
// artifactId = project.name
61+
// version = project.version.toString()
62+
// }
63+
//
64+
// configureEach {
65+
// if (this is MavenPublication) {
66+
// pom {
67+
// setupPom(project)
68+
// }
69+
// }
70+
// }
71+
//
72+
// repositories {
73+
// mavenCentral()
74+
// if (sonatypeContains) {
75+
// if (project.version.toString().contains("SNAPSHOT", true)) {
76+
// configPublishMaven(Sonatype.Snapshot, sonatypeUsername, sonatypePassword)
77+
// } else {
78+
// configPublishMaven(Sonatype.Central, sonatypeUsername, sonatypePassword)
79+
// }
80+
// }
81+
// mavenLocal()
82+
// }
83+
// }
84+
//}
85+
//signing {
86+
// setupSigning(publishing.publications)
87+
//}
6788

6889

6990
inline val Project.sourceSets: SourceSetContainer

buildSrc/src/main/kotlin/suspend-transform.multiplatform-maven-publish.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ plugins {
99
`maven-publish`
1010
}
1111

12+
setup(IProject)
13+
1214
tasks.withType<JavaCompile> {
1315
sourceCompatibility = "1.8"
1416
targetCompatibility = "1.8"
1517
options.encoding = "UTF-8"
1618
}
1719

18-
setup(IProject)
1920

2021
val (sonatypeUsername, sonatypePassword) = sonatypeUserInfoOrNull
2122

@@ -37,8 +38,8 @@ multiplatformConfigPublishing {
3738
gpg = Gpg.ofSystemPropOrNull()
3839

3940
if (systemProp("SIMBOT_LOCAL").toBoolean()) {
41+
logger.info("Is 'SIMBOT_LOCAL', mainHost set as null")
4042
mainHost = null
4143
}
4244

4345
}
44-

buildSrc/src/main/kotlin/suspend-transform.nexus-publish.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import love.forte.gradle.common.core.project.setup
12
import love.forte.gradle.common.core.repository.Repositories
23
import love.forte.gradle.common.publication.configure.nexusPublishConfig
3-
import utils.by
44

55
plugins {
66
id("io.github.gradle-nexus.publish-plugin")
@@ -10,9 +10,11 @@ plugins {
1010
//
1111
//val versionValue = if (isRelease()) Version.VERSION else "${Version.VERSION}-SNAPSHOT"
1212

13-
group = "love.forte.plugin.suspend-transform"
14-
version = "0.0.1"
15-
description = "Generate platform-compatible functions for Kotlin suspend functions"
13+
//group = "love.forte.plugin.suspend-transform"
14+
//version = "0.0.1"
15+
//description = "Generate platform-compatible functions for Kotlin suspend functions"
16+
17+
setup(IProject)
1618

1719
val isPublishConfigurable = isPublishConfigurable()
1820

0 commit comments

Comments
 (0)