Skip to content

Commit 1ea6c05

Browse files
committed
release: v0.2.7
1 parent 7534eaa commit 1ea6c05

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

.github/workflows/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
-Porg.gradle.jvmargs="-XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"
5656
-Porg.gradle.daemon=false
5757
env:
58-
PLUGIN_AUTO: false
58+
PLUGIN_AUTO: ${{ matrix.os == 'ubuntu-latest' }}
5959

6060
publish-gradle-plugin:
6161
name: Publish Gradle Plugin

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, 6)
11+
override val version: Version = version(0, 2, 7)
1212

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

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

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import love.forte.gradle.common.core.Gpg
22
import love.forte.gradle.common.core.project.setup
33
import love.forte.gradle.common.publication.configure.jvmConfigPublishing
44
import love.forte.gradle.common.publication.configure.setupPom
5+
import utils.isCi
6+
import utils.isLinux
57

68
plugins {
79
id("org.jetbrains.dokka")
@@ -14,30 +16,32 @@ setup(IProject)
1416
//val (sonatypeUsername, sonatypePassword) = sonatypeUserInfoOrNull
1517

1618
//val sonatypeContains = sonatypeUserInfoOrNull != null
19+
if (!isCi() || isLinux) {
20+
jvmConfigPublishing {
21+
project = IProject
22+
val jarSources by tasks.registering(Jar::class) {
23+
archiveClassifier.set("sources")
24+
from(sourceSets["main"].allSource)
25+
}
1726

18-
jvmConfigPublishing {
19-
project = IProject
20-
val jarSources by tasks.registering(Jar::class) {
21-
archiveClassifier.set("sources")
22-
from(sourceSets["main"].allSource)
23-
}
24-
25-
val jarJavadoc by tasks.registering(Jar::class) {
26-
dependsOn(tasks.dokkaJavadoc)
27-
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
28-
archiveClassifier.set("javadoc")
29-
}
27+
val jarJavadoc by tasks.registering(Jar::class) {
28+
dependsOn(tasks.dokkaJavadoc)
29+
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
30+
archiveClassifier.set("javadoc")
31+
}
3032

31-
artifact(jarSources)
32-
artifact(jarJavadoc)
33+
artifact(jarSources)
34+
artifact(jarJavadoc)
3335

34-
isSnapshot = project.version.toString().contains("SNAPSHOT", true)
35-
releasesRepository = ReleaseRepository
36-
snapshotRepository = SnapshotRepository
37-
gpg = Gpg.ofSystemPropOrNull()
36+
isSnapshot = project.version.toString().contains("SNAPSHOT", true)
37+
releasesRepository = ReleaseRepository
38+
snapshotRepository = SnapshotRepository
39+
gpg = Gpg.ofSystemPropOrNull()
3840

41+
}
3942
}
4043

44+
4145
publishing.publications.configureEach {
4246
if (this is MavenPublication) {
4347
pom {
@@ -46,6 +50,7 @@ publishing.publications.configureEach {
4650
}
4751
}
4852

53+
4954
//publishing {
5055
// publications {
5156
// create<MavenPublication>("suspendTransformJvmDist") {

buildSrc/src/main/kotlin/utils/PropertiesUtil.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ fun isRelease(): Boolean = systemProperty("RELEASE").toBoolean()
3333
* 是否在CI中
3434
*/
3535
fun isCi(): Boolean = systemProperty("CI").toBoolean()
36+
3637
/**
3738
* 是否自动配置gradle的发布
3839
*/
3940
fun isAutomatedGradlePluginPublishing(): Boolean = isCi() && systemProperty("PLUGIN_AUTO").toBoolean()
41+
42+
val isLinux: Boolean = systemProperty("os.name")?.contains("linux", true) ?: false

0 commit comments

Comments
 (0)