-
Notifications
You must be signed in to change notification settings - Fork 8
Split the plugin in 2 parts: regular and aggregation #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1fa7ecd
wip
martinbonnin 281fa66
Split the plugin in 2
martinbonnin 87d59e6
update CHANGELOG
martinbonnin 7ac3e89
remove leftovers
martinbonnin ac9d7db
Remove the plugin boilerplate
martinbonnin 05d0ea0
tweak error message, thanks @vlsi!
martinbonnin 7c30fe3
put smaller code first
martinbonnin 79fe2c9
tweak message
martinbonnin 1d43f45
fix wording
martinbonnin 6f0706b
Remove verifyStatus
martinbonnin 4e7a93d
remove useless code
martinbonnin 3b41d9e
Use aggregation consistently
martinbonnin 8234974
remove unused class
martinbonnin f063a3f
Update src/main/kotlin/nmcp/internal/task/publish.kt
martinbonnin baf5bb2
Update src/main/kotlin/nmcp/internal/task/publish.kt
martinbonnin adb9d56
Update src/main/kotlin/nmcp/internal/task/publish.kt
martinbonnin 9a15ce7
Merge branch 'main' into rearchitecture
martinbonnin 6dde059
unbreak tests
martinbonnin 95fe190
NmcpSpec -> CentralPortalOptions
martinbonnin 424ef0b
Update src/main/kotlin/nmcp/NmcpExtension.kt
martinbonnin de6e2e5
configuration cache
martinbonnin 7f3279b
missing parenthesis
martinbonnin 2504216
unbreak tests
martinbonnin 7cdaf30
format
martinbonnin 066ead4
Merge branch 'main' into rearchitecture
martinbonnin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,12 @@ | ||
| ## Split the plugin in 2 separate plugins: | ||
|
|
||
| - `com.gradleup.nmcp` creates a `zip${publicationName.capitalized()}Publication` and `publish${publicationName.capitalized()}PublicationToCentralPortal` task for each publication | ||
| - `publish${publicationName.capitalized()}PublicationToCentralPortal` can be used to publish an individual publication to the central portal. If using this, you need to configure the `centralPortal {}` block. | ||
| - The output of `zip${publicationName.capitalized()}Publication` is registered as an outgoing artifact so that the aggregation plugin can collect the files from all projects. | ||
| - `com.gradleup.nmcp.aggregation` can aggregate all zips from several projects and upload them in a single deployment to the central portal. | ||
|
|
||
| ## Other changes: | ||
|
|
||
| - The default `publicationType` is now `"AUTOMATIC"`, make sure to set it to `"USER_MANAGED"` if you want to manually confirm releases. | ||
| - `NmcpSpec.endpoint` is replaced by `NmcpSpec.baseUrl`. | ||
| - `NmcpSpec.publicationType` is renamed `NmcpSpec.publishingType`. |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,11 +1,16 @@ | ||
| [versions] | ||
| kgp = "2.1.20" | ||
| ksp = "2.1.20-2.0.0" | ||
|
|
||
| [libraries] | ||
| json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.8.1" | ||
| okio = "com.squareup.okio:okio:3.8.0" | ||
| okhttp = "com.squareup.okhttp3:okhttp:4.12.0" | ||
| okhttp-logging-interceptor = "com.squareup.okhttp3:logging-interceptor:4.12.0" | ||
| mockwebserver = "com.squareup.okhttp3:mockwebserver:4.12.0" | ||
| gradle-min = "dev.gradleplugins:gradle-api:8.0" | ||
|
|
||
| [plugins] | ||
| kgp = { id = "org.jetbrains.kotlin.jvm", version.ref = "kgp" } | ||
| ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } | ||
| ggp = { id = "com.gradleup.gratatouille", version = "0.0.6-SNAPSHOT-b6a9df610d12e3bbd5066d4bb8f6d640efcc0ca5" } |
This file contains hidden or 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 hidden or 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,56 @@ | ||
| package nmcp | ||
|
|
||
| import java.time.Duration | ||
| import org.gradle.api.provider.Property | ||
|
|
||
| abstract class CentralPortalOptions { | ||
| /** | ||
| * The central portal username | ||
| */ | ||
| abstract val username: Property<String> | ||
|
|
||
| /** | ||
| * The central portal password | ||
| */ | ||
| abstract val password: Property<String> | ||
|
|
||
| /** | ||
| * The publication type (optional). | ||
| * One of: | ||
| * - "AUTOMATIC": the deployment is automatically published. | ||
| * - "USER_MANAGED": the deployment is validated but not published. It must be published manually from the Central Portal UI. | ||
| * | ||
| * Default: AUTOMATIC | ||
| */ | ||
| abstract val publishingType: Property<String> | ||
|
|
||
| /** | ||
| * A name for the publication (optional). | ||
| * | ||
| * Default: "${project.name}-${project.version}.zip" | ||
| */ | ||
| abstract val publicationName: Property<String> | ||
|
|
||
| /** | ||
| * After a deployment has been uploaded, the central portal verifies that it matches the | ||
| * maven central requirements, which may take some time. | ||
| * | ||
| * After waiting, the deployment is either: | ||
| * - VALIDATED: it needs to be manually published in the Central Portal UI. | ||
| * - PUBLISHED: it is published and available on Maven Central. | ||
| * - FAILED: the deployment has failed. You | ||
| * | ||
| * [verificationTimeout] specifies what duration to wait for the verification to complete. | ||
| * You may pass the special value '0' to disable waiting for verification altogether. | ||
| * | ||
| * Default: 10 minutes. | ||
| */ | ||
| abstract val verificationTimeout: Property<Duration> | ||
|
|
||
| /** | ||
| * The API endpoint to use (optional). | ||
| * | ||
| * Default: "https://central.sonatype.com/". | ||
| */ | ||
| abstract val baseUrl: Property<String> | ||
| } |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.