Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 5 additions & 43 deletions .github/workflows/extended-publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Publishes the Gradle plugins: every merge into extended to GitHub Packages as a dev build,
# and a release tag to Maven Central (through the Sonatype Central Portal, with the plugin
# marker artifacts) and to the Gradle Plugin Portal.
# marker artifacts). The Gradle Plugin Portal is not used: it refused the plugin, a fork of
# org.jetbrains.compose, so users add mavenCentral() to pluginManagement.repositories.
#
# Three modes, one set of jobs:
# - dev (a push to extended, or a manual run with mode dev on extended, which the core fork's
Expand All @@ -13,11 +14,9 @@
# dev build names libraries that exist.
# - dry run (a pull request, or a manual run with no tag): builds both, checks the dev build,
# and checks the Central bundle signed with a key made in the job and thrown away after,
# plugin markers included. Nothing is uploaded. The Plugin Portal is not asked anything:
# publishPlugins --validate-only sends the plugin to the Portal with an API key to be checked
# there, so a run without credentials cannot use it.
# plugin markers included. Nothing is uploaded.
# - release (a tag v<version>, or a manual run naming one): the Central bundle, signed with the
# release key, uploaded to the Central Portal, then publishPlugins. The tag must sit on a
# release key, uploaded to the Central Portal. The tag must sit on a
# merge commit on extended's first-parent line and name deploy.version: merging into
# extended is the release, and that merge is the owner's.
#
Expand All @@ -26,10 +25,7 @@
# MAVEN_GPG_PASSPHRASE its passphrase
# CENTRAL_TOKEN_USERNAME the Central Portal user token's username half
# CENTRAL_TOKEN_PASSWORD the Central Portal user token's password half
# GRADLE_PUBLISH_KEY the Gradle Plugin Portal API key
# GRADLE_PUBLISH_SECRET its secret
# The release uploads run in the environments maven-central and gradle-plugin-portal, where
# required reviewers can be set.
# The release upload runs in the environment maven-central, where required reviewers can be set.
name: Extended publish

on:
Expand Down Expand Up @@ -454,37 +450,3 @@ jobs:
run: |
extended/publish/central-upload.sh "$RUNNER_TEMP/central-bundle.zip" \
"compose-multiplatform-extended $VERSION" "$TYPE"

plugin-portal:
name: Publish to the Gradle Plugin Portal
needs: [ plan, central ]
if: needs.plan.outputs.release == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 45
environment: gradle-plugin-portal
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.plan.outputs.ref }}

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'

- uses: gradle/actions/setup-gradle@v4
with:
cache-read-only: true

# com.gradle.plugin-publish reads the key and secret from these two variables, and
# publishes every plugin the build declares, at deploy.version.
- name: publishPlugins
working-directory: gradle-plugins
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: |
set -euo pipefail
[[ -n "$GRADLE_PUBLISH_KEY" && -n "$GRADLE_PUBLISH_SECRET" ]] ||
{ echo "::error::GRADLE_PUBLISH_KEY and GRADLE_PUBLISH_SECRET must be set"; exit 1; }
./gradlew --no-daemon publishPlugins
30 changes: 17 additions & 13 deletions extended/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,22 @@ nothing in the executable that the application does not use.

## Install

The fork is not on a public repository yet. Publish the core fork's Compose and then the plugin
to your local Maven repository, and put `mavenLocal()` ahead of the Gradle Plugin Portal:
The plugin and the Compose libraries are on Maven Central, not on the Gradle Plugin Portal (the
Portal does not accept a fork of an active plugin). Add `mavenCentral()` to the plugin
repositories:

```kotlin
// settings.gradle.kts
pluginManagement {
repositories { mavenCentral(); gradlePluginPortal(); google() }
}
dependencyResolutionManagement {
repositories { mavenCentral(); google() }
}
```

To try an unreleased build instead, publish the core fork's Compose and then the plugin to your
local Maven repository, and put `mavenLocal()` first in both lists:

```sh
# in a checkout of compose-multiplatform-core-extended, branch extended
Expand All @@ -63,22 +77,12 @@ cd gradle-plugins
-Pdeploy.version=1.11.1-ext.3-dev -Pcompose.version=1.11.1-ext.2
```

```kotlin
// settings.gradle.kts
pluginManagement {
repositories { mavenLocal(); gradlePluginPortal(); mavenCentral(); google() }
}
dependencyResolutionManagement {
repositories { mavenLocal(); mavenCentral(); google() }
}
```

```kotlin
// build.gradle.kts
plugins {
kotlin("jvm") version "2.2.20"
kotlin("plugin.compose") version "2.2.20"
id("org.thisisthepy.compose") version "1.11.1-ext.3-dev"
id("org.thisisthepy.compose") version "1.11.1-ext.3"
}
```

Expand Down
19 changes: 16 additions & 3 deletions extended/README_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,21 @@ AWT 없이 만들기 때문에 애플리케이션이 쓰지 않는 것은 실행

## 설치

아직 공개 저장소에 없습니다. core 포크의 Compose 를, 그다음 플러그인을 로컬 Maven 저장소에 게시하고,
`mavenLocal()` 을 Gradle Plugin Portal 보다 앞에 둡니다.
플러그인과 Compose 라이브러리는 Maven Central 에 있습니다. Gradle Plugin Portal 에는 없습니다. 활성 플러그인의
포크는 Portal 이 받지 않습니다. 플러그인 저장소에 `mavenCentral()` 을 넣습니다.

```kotlin
// settings.gradle.kts
pluginManagement {
repositories { mavenCentral(); gradlePluginPortal(); google() }
}
dependencyResolutionManagement {
repositories { mavenCentral(); google() }
}
```

아직 나오지 않은 빌드를 써 보려면 core 포크의 Compose 를, 그다음 플러그인을 로컬 Maven 저장소에 게시하고,
두 목록 맨 앞에 `mavenLocal()` 을 둡니다.

```sh
# compose-multiplatform-core-extended 의 extended 브랜치 체크아웃에서
Expand All @@ -44,7 +57,7 @@ cd gradle-plugins
-Pdeploy.version=1.11.1-ext.3-dev -Pcompose.version=1.11.1-ext.2
```

`settings.gradle.kts` 와 `build.gradle.kts` 는 영어 README 의 Install 절과 같습니다. 플러그인 ID 는
`build.gradle.kts` 는 영어 README 의 Install 절과 같습니다. 플러그인 ID 는
`org.thisisthepy.compose` 입니다. 이 포크 자신의 ID 라서 JetBrains 의 `org.jetbrains.compose` 옆에 두어도
어느 쪽도 다른 쪽을 대신하지 않습니다.

Expand Down
Loading