@@ -2,6 +2,8 @@ import love.forte.gradle.common.core.Gpg
2
2
import love.forte.gradle.common.core.project.setup
3
3
import love.forte.gradle.common.publication.configure.jvmConfigPublishing
4
4
import love.forte.gradle.common.publication.configure.setupPom
5
+ import utils.isCi
6
+ import utils.isLinux
5
7
6
8
plugins {
7
9
id(" org.jetbrains.dokka" )
@@ -14,30 +16,32 @@ setup(IProject)
14
16
// val (sonatypeUsername, sonatypePassword) = sonatypeUserInfoOrNull
15
17
16
18
// 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
+ }
17
26
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
+ }
30
32
31
- artifact(jarSources)
32
- artifact(jarJavadoc)
33
+ artifact(jarSources)
34
+ artifact(jarJavadoc)
33
35
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()
38
40
41
+ }
39
42
}
40
43
44
+
41
45
publishing.publications.configureEach {
42
46
if (this is MavenPublication ) {
43
47
pom {
@@ -46,6 +50,7 @@ publishing.publications.configureEach {
46
50
}
47
51
}
48
52
53
+
49
54
// publishing {
50
55
// publications {
51
56
// create<MavenPublication>("suspendTransformJvmDist") {
0 commit comments