-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'JetBrains:master' into settings-property-fix
- Loading branch information
Showing
66 changed files
with
739 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import org.jetbrains.compose.internal.publishing.* | ||
|
||
plugins { | ||
signing | ||
} | ||
|
||
val mavenCentral = MavenCentralProperties(project) | ||
if (mavenCentral.signArtifacts) { | ||
signing.useInMemoryPgpKeys( | ||
mavenCentral.signArtifactsKey.get(), | ||
mavenCentral.signArtifactsPassword.get() | ||
) | ||
} | ||
|
||
val publishingDir = project.layout.buildDirectory.dir("publishing") | ||
val originalArtifactsRoot = publishingDir.map { it.dir("original") } | ||
val preparedArtifactsRoot = publishingDir.map { it.dir("prepared") } | ||
val modulesFile = publishingDir.map { it.file("modules.txt") } | ||
|
||
val findComposeModules by tasks.registering(FindModulesInSpaceTask::class) { | ||
requestedCoordinates.set(mavenCentral.coordinates) | ||
spaceInstanceUrl.set("https://public.jetbrains.space") | ||
spaceClientId.set(System.getenv("COMPOSE_REPO_USERNAME") ?: "") | ||
spaceClientSecret.set(System.getenv("COMPOSE_REPO_KEY") ?: "") | ||
spaceProjectId.set(System.getenv("COMPOSE_DEV_REPO_PROJECT_ID") ?: "") | ||
spaceRepoId.set(System.getenv("COMPOSE_DEV_REPO_REPO_ID") ?: "") | ||
modulesTxtFile.set(modulesFile) | ||
} | ||
|
||
val downloadArtifactsFromComposeDev by tasks.registering(DownloadFromSpaceMavenRepoTask::class) { | ||
dependsOn(findComposeModules) | ||
modulesToDownload.set(project.provider { | ||
readComposeModules( | ||
modulesFile, | ||
originalArtifactsRoot | ||
) | ||
}) | ||
spaceRepoUrl.set("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
} | ||
|
||
val fixModulesBeforePublishing by tasks.registering(FixModulesBeforePublishingTask::class) { | ||
dependsOn(downloadArtifactsFromComposeDev) | ||
inputRepoDir.set(originalArtifactsRoot) | ||
outputRepoDir.set(preparedArtifactsRoot) | ||
} | ||
|
||
val reuploadArtifactsToMavenCentral by tasks.registering(UploadToSonatypeTask::class) { | ||
dependsOn(fixModulesBeforePublishing) | ||
|
||
modulesToUpload.set(project.provider { readComposeModules(modulesFile, preparedArtifactsRoot) }) | ||
|
||
sonatypeServer.set("https://oss.sonatype.org") | ||
user.set(mavenCentral.user) | ||
password.set(mavenCentral.password) | ||
autoCommitOnSuccess.set(mavenCentral.autoCommitOnSuccess) | ||
stagingProfileName.set(mavenCentral.stage) | ||
stagingDescription.set(mavenCentral.description) | ||
} | ||
|
||
fun readComposeModules( | ||
modulesFile: Provider<out FileSystemLocation>, | ||
repoRoot: Provider<out FileSystemLocation> | ||
): List<ModuleToUpload> = | ||
modulesFile.get().asFile.readLines() | ||
.filter { it.isNotBlank() } | ||
.map { line -> | ||
val (group, artifact, version) = line.split(":") | ||
ModuleToUpload( | ||
groupId = group, | ||
artifactId = artifact, | ||
version = version, | ||
localDir = repoRoot.get().asFile.resolve("$group/$artifact/$version") | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import org.gradle.kotlin.dsl.gradleKotlinDsl | ||
|
||
plugins { | ||
`java` | ||
`java-gradle-plugin` | ||
kotlin("jvm") version "1.9.24" | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven("https://maven.pkg.jetbrains.space/public/p/space/maven") | ||
} | ||
|
||
dependencies { | ||
compileOnly(gradleApi()) | ||
compileOnly(gradleKotlinDsl()) | ||
|
||
val jacksonVersion = "2.12.5" | ||
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-xml:$jacksonVersion") | ||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion") | ||
implementation("io.ktor:ktor-client-okhttp:1.6.4") | ||
implementation("org.apache.tika:tika-parsers:1.24.1") | ||
implementation("org.jsoup:jsoup:1.14.3") | ||
implementation("org.jetbrains:space-sdk-jvm:83821-beta") | ||
implementation("de.undercouch:gradle-download-task:4.1.2") | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.