-
Notifications
You must be signed in to change notification settings - Fork 133
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
Support publishing Gradle plugin marker artifact #766
Merged
Merged
Conversation
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
Goooler
commented
Jan 3, 2024
dkimitsa
reviewed
Jan 3, 2024
dkimitsa
approved these changes
Jan 3, 2024
Goooler
changed the title
Support publishing Gradle plugin marker artifacts
Support publishing Gradle plugin marker artifact
Jan 3, 2024
dkimitsa
added a commit
to dkimitsa/robovm
that referenced
this pull request
Apr 15, 2024
it discovered a set of issue: ## Issue 1. plugin wasn't deployed in several last builds from master branch. ``` Execution failed for task ':validatePlugins'. > Plugin validation failed with 1 problem: - Error: Type 'org.robovm.gradle.tasks.AbstractSimulatorTask' method 'getDeviceType()' should not be annotated with: @internal. ``` fix: annotation was removed (method doesn't look as pure getter) and `validatePlugins` option was added to build invocation ## Issue 2. its discovered that after MobiVM#766 applied build failed with: ``` * What went wrong: A problem occurred configuring project ':facebook-share-kit'. > Could not create task ':facebook-share-kit:launchIPhoneSimulator'. > Could not create task of type 'IPhoneSimulatorTask'. > Could not generate a decorated class for type IPhoneSimulatorTask. > org/robovm/compiler/log/Logger Caused by: java.lang.NoClassDefFoundError: org/robovm/compiler/log/Logger ``` root case of it: `robovm-compiler` dependency was excluded from shadowJar (thats a bug). But it was working as previously pom.xml contained runtime dependency to `robovm-compiler` (that's another bug as we produce shadowJar with merged dependencies) ## Issue 3: pom.xml for gradle plugin is empty ``` <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- This module was also published with a richer model, Gradle metadata, --> <!-- which should be used instead. Do not delete the following line which --> <!-- is to indicate to Gradle or any Gradle module metadata file consumer --> <!-- that they should prefer consuming it instead. --> <!-- do_not_remove: published-with-gradle-metadata --> <modelVersion>4.0.0</modelVersion> <groupId>com.mobidevelop.robovm</groupId> <artifactId>robovm-gradle-plugin</artifactId> <version>2.3.22-SNAPSHOT</version> </project> ``` it happens as `plugin-publish` uses `pluginMaven` publication but we set metadata for `mavenJava`, due another bug both `pluginMaven` and `mavenJava` are being deployed and `pluginMaven` overrides first (thats another issues) ## Issue 4: two artifacts are being deployed under same id: `pluginMaven` and `mavenJava` it can be observer as following warning: > Multiple publications with coordinates 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.22-SNAPSHOT' are published to repository 'mavenLocal'. The publications 'mavenJava' in root project 'robovm-gradle-plugin' and 'pluginMaven' in root project 'robovm-gradle-plugin' will overwrite each other! Fixes: 1. To have single prorely configured artifact `mavenJava` to be removed and `pluginMaven` used as described in `plugin-publish` docs; 2. `Caused by: java.lang.NoClassDefFoundError: org/robovm/compiler/log/Logger` is fixed by removing 'exclude(dependency' -- compiler has to be packed into shadowJar
dkimitsa
pushed a commit
to dkimitsa/robovm
that referenced
this pull request
Apr 15, 2024
* Configure publishing plugin https://plugins.gradle.org/docs/publish-plugin * Compat old users * Fix legacy namespace (cherry picked from commit 040baf7)
dkimitsa
added a commit
to dkimitsa/robovm
that referenced
this pull request
Apr 15, 2024
it discovered a set of issue: ## Issue 1. plugin wasn't deployed in several last builds from master branch. ``` Execution failed for task ':validatePlugins'. > Plugin validation failed with 1 problem: - Error: Type 'org.robovm.gradle.tasks.AbstractSimulatorTask' method 'getDeviceType()' should not be annotated with: @internal. ``` fix: annotation was removed (method doesn't look as pure getter) and `validatePlugins` option was added to build invocation ## Issue 2. its discovered that after MobiVM#766 applied build failed with: ``` * What went wrong: A problem occurred configuring project ':facebook-share-kit'. > Could not create task ':facebook-share-kit:launchIPhoneSimulator'. > Could not create task of type 'IPhoneSimulatorTask'. > Could not generate a decorated class for type IPhoneSimulatorTask. > org/robovm/compiler/log/Logger Caused by: java.lang.NoClassDefFoundError: org/robovm/compiler/log/Logger ``` root case of it: `robovm-compiler` dependency was excluded from shadowJar (thats a bug). But it was working as previously pom.xml contained runtime dependency to `robovm-compiler` (that's another bug as we produce shadowJar with merged dependencies) ## Issue 3: pom.xml for gradle plugin is empty ``` <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- This module was also published with a richer model, Gradle metadata, --> <!-- which should be used instead. Do not delete the following line which --> <!-- is to indicate to Gradle or any Gradle module metadata file consumer --> <!-- that they should prefer consuming it instead. --> <!-- do_not_remove: published-with-gradle-metadata --> <modelVersion>4.0.0</modelVersion> <groupId>com.mobidevelop.robovm</groupId> <artifactId>robovm-gradle-plugin</artifactId> <version>2.3.22-SNAPSHOT</version> </project> ``` it happens as `plugin-publish` uses `pluginMaven` publication but we set metadata for `mavenJava`, due another bug both `pluginMaven` and `mavenJava` are being deployed and `pluginMaven` overrides first (thats another issues) ## Issue 4: two artifacts are being deployed under same id: `pluginMaven` and `mavenJava` it can be observer as following warning: > Multiple publications with coordinates 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.22-SNAPSHOT' are published to repository 'mavenLocal'. The publications 'mavenJava' in root project 'robovm-gradle-plugin' and 'pluginMaven' in root project 'robovm-gradle-plugin' will overwrite each other! Fixes: 1. To have single prorely configured artifact `mavenJava` to be removed and `pluginMaven` used as described in `plugin-publish` docs; 2. `Caused by: java.lang.NoClassDefFoundError: org/robovm/compiler/log/Logger` is fixed by removing 'exclude(dependency' -- compiler has to be packed into shadowJar
Tom-Ski
pushed a commit
that referenced
this pull request
Apr 15, 2024
it discovered a set of issue: ## Issue 1. plugin wasn't deployed in several last builds from master branch. ``` Execution failed for task ':validatePlugins'. > Plugin validation failed with 1 problem: - Error: Type 'org.robovm.gradle.tasks.AbstractSimulatorTask' method 'getDeviceType()' should not be annotated with: @internal. ``` fix: annotation was removed (method doesn't look as pure getter) and `validatePlugins` option was added to build invocation ## Issue 2. its discovered that after #766 applied build failed with: ``` * What went wrong: A problem occurred configuring project ':facebook-share-kit'. > Could not create task ':facebook-share-kit:launchIPhoneSimulator'. > Could not create task of type 'IPhoneSimulatorTask'. > Could not generate a decorated class for type IPhoneSimulatorTask. > org/robovm/compiler/log/Logger Caused by: java.lang.NoClassDefFoundError: org/robovm/compiler/log/Logger ``` root case of it: `robovm-compiler` dependency was excluded from shadowJar (thats a bug). But it was working as previously pom.xml contained runtime dependency to `robovm-compiler` (that's another bug as we produce shadowJar with merged dependencies) ## Issue 3: pom.xml for gradle plugin is empty ``` <?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- This module was also published with a richer model, Gradle metadata, --> <!-- which should be used instead. Do not delete the following line which --> <!-- is to indicate to Gradle or any Gradle module metadata file consumer --> <!-- that they should prefer consuming it instead. --> <!-- do_not_remove: published-with-gradle-metadata --> <modelVersion>4.0.0</modelVersion> <groupId>com.mobidevelop.robovm</groupId> <artifactId>robovm-gradle-plugin</artifactId> <version>2.3.22-SNAPSHOT</version> </project> ``` it happens as `plugin-publish` uses `pluginMaven` publication but we set metadata for `mavenJava`, due another bug both `pluginMaven` and `mavenJava` are being deployed and `pluginMaven` overrides first (thats another issues) ## Issue 4: two artifacts are being deployed under same id: `pluginMaven` and `mavenJava` it can be observer as following warning: > Multiple publications with coordinates 'com.mobidevelop.robovm:robovm-gradle-plugin:2.3.22-SNAPSHOT' are published to repository 'mavenLocal'. The publications 'mavenJava' in root project 'robovm-gradle-plugin' and 'pluginMaven' in root project 'robovm-gradle-plugin' will overwrite each other! Fixes: 1. To have single prorely configured artifact `mavenJava` to be removed and `pluginMaven` used as described in `plugin-publish` docs; 2. `Caused by: java.lang.NoClassDefFoundError: org/robovm/compiler/log/Logger` is fixed by removing 'exclude(dependency' -- compiler has to be packed into shadowJar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #765.
https://plugins.gradle.org/docs/publish-plugin