|
1 | 1 | import love.forte.gradle.common.core.Gpg |
2 | 2 | import love.forte.gradle.common.core.project.setup |
3 | 3 | import love.forte.gradle.common.core.property.systemProp |
4 | | -import love.forte.gradle.common.publication.configure.multiplatformConfigPublishing |
| 4 | +import love.forte.gradle.common.publication.configure.* |
5 | 5 |
|
6 | 6 | plugins { |
7 | 7 | id("org.jetbrains.dokka") |
@@ -43,6 +43,43 @@ multiplatformConfigPublishing { |
43 | 43 |
|
44 | 44 | } |
45 | 45 |
|
| 46 | +val config = MavenMultiplatformPublishingConfigExtensions().apply { |
| 47 | + project = IProject |
| 48 | + val jarJavadoc by tasks.registering(Jar::class) { |
| 49 | + group = "documentation" |
| 50 | + archiveClassifier.set("javadoc") |
| 51 | + } |
| 52 | + artifact(jarJavadoc) |
| 53 | + isSnapshot = project.version.toString().contains("SNAPSHOT", true) |
| 54 | + releasesRepository = ReleaseRepository |
| 55 | + snapshotRepository = SnapshotRepository |
| 56 | + gpg = Gpg.ofSystemPropOrNull() |
| 57 | + |
| 58 | + if (systemProp("SIMBOT_LOCAL").toBoolean()) { |
| 59 | + logger.info("Is 'SIMBOT_LOCAL', mainHost set as null") |
| 60 | + mainHost = null |
| 61 | + } |
| 62 | + |
| 63 | + mainHostSupportedTargets += setOf("wasm_js") |
| 64 | +} |
| 65 | + |
| 66 | +publishing { |
| 67 | + commonConfigPublishingRepositories(config) |
| 68 | + publications { |
| 69 | + withType<MavenPublication> { |
| 70 | + commonConfigMavenPublication(project, config) |
| 71 | + } |
| 72 | + } |
| 73 | + commonPublicationSignConfig(config) |
| 74 | + |
| 75 | + if (config.mainHost != null) { |
| 76 | + |
| 77 | + } |
| 78 | +} |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
46 | 83 | // TODO see https://github.com/gradle-nexus/publish-plugin/issues/208#issuecomment-1465029831 |
47 | 84 | val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>() |
48 | 85 | tasks.withType<PublishToMavenRepository>().configureEach { |
|
0 commit comments