-
Notifications
You must be signed in to change notification settings - Fork 34
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
Submit Gradle plugin to plugins.gradle.org #107
Comments
Hi, I can look into this, but as forbidden-apis is not a Gradle project, it cannot easily use the plugin publishing API (no connector from Apache Ant). No idea how to publish it there. For several reasons, forbiddenapis cannot be built with Gradle at the moment (e.g., BTW: forbiddenapis is also available on |
Wht I can do at least is providing the plugin marker artifact: https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_markers Publishing in Gradle's repository is impossible. Using the marker artifact, it would reduce the above code to: pluginRepositories {
mavenCentral()
}
plugins { id "de.thetaphi.forbiddenapis" version "2.2" } |
This would be much appreciated -- especially for use with the Kotlin DSL https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/#configuring-plugins |
Hi, The plugin is waiting for approval and I need them to delete it again (i did some test uploads, but there are now broken artifacts in the plugin portal). The current state, including the used build.gradle file (just for this download from Maven push to Gradle one) can be found in their forum: https://discuss.gradle.org/t/please-remove-test-upload-of-plugin-which-is-not-yet-approved-anyways/28456 Once this is all sorted out, I will push all versions since 2.0 also to the Gradle Plugin portal. |
Here is the gist with my "publish hack": https://gist.github.com/uschindler/8af468efe73aaded3d8e25f265e5e192 |
The 2.x series of the plugin (1.x has no Gradle support) were released through the plugin portal. I did a quick test, all seems fine: https://plugins.gradle.org/plugin/de.thetaphi.forbiddenapis Could you check it, because I can delete and re-upload them for up to 7 days. |
build.gradle.kts
Same with: build.gradle
|
This is a completely different issue and has noting to do with this one. Which Gradle version? Can you post the full stacktrace in a new issue? |
In my own check it works, by the way (Gradle 3.3 and Gradle 4.3). |
This looks like an issue with order of initialization. The new plugin mechanism initializes the forbidden plugin first, and this causes the error message. The reason for this is: The plugin does not explicitly load the java plugin, instead it just looks if it's there. Other plugin do it in the same way. The better way to handle this would be to load the JavaBasePlugin first using apply(). This cannot be fixed for existing versions out there. But this is a new issue, so I'd open a new one. BTW, sometimes it works, depending on which other plugin you actually have in your gradle file. It looks like Gradle initializes 3rd party plugins first (I have no idea why). |
Please submit your Gradle plugin to the Gradle Plugin Portal:
https://plugins.gradle.org/docs/submit
It would simplify Gradle build files.
Instead of:
One would only need:
plugins { id "de.thetaphi.forbiddenapis" version "2.2" }
See: https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block
The text was updated successfully, but these errors were encountered: