Skip to content
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

Redistributing org.gradle.toolingapi #1308

Open
merks opened this issue Jul 3, 2024 · 3 comments
Open

Redistributing org.gradle.toolingapi #1308

merks opened this issue Jul 3, 2024 · 3 comments

Comments

@merks
Copy link

merks commented Jul 3, 2024

While investigating

eclipse-simrel/simrel.build#438

I noticed that the org.gradle.toolingapi bundle is wrapping a jar that is also an OSGi bundle:

image

I think this jar is coming from here, right?

https://repo.gradle.org/ui/native/libs-releases/org/gradle/gradle-tooling-api/

It's not in Maven central, but you are aware of that:

gradle/gradle#16683

I suppose I could include this bundle in Orbit, but it not being at Maven Central makes that complicated such that it's probably less work to keep doing what you're doing manually. I suppose that makes this more a question than a request.

Please let me know your thoughts...

@donat
Copy link
Contributor

donat commented Jul 16, 2024

Hi Ed! Sorry for the late reply, I was offline in the past few weeks. The Tooling API jar is indeed not published to maven central. That the jar we publish to repo.gradle.org does not have the OSGi metadata, that's why we repackage and publish it in the Buildship build. There's quite a bit of code for that in the repository, and because we only use it for Buildship, it was natural to keep everything in the same repository.

Back then we considered publishing the tapi jar to orbit, but we concluded that without consumers outside of Buildship, it does not make sense to maintain a shared bundle. If there's a potential consumer, however, we should change that and publish it. For that the easies solution, as you said, is to use what we have. Generating the OSGi-ified jar is rather simple:

  • update the tapi version in gradle.properties
  • run the createP2Repository task: ./gradlew :org.gradle.toolingapi:createP2Repository

@thahnen
Copy link
Contributor

thahnen commented Sep 11, 2024

Hey everyone,

A fairly easy solution I was thinking of to already have the Gradle Tooling API artifact from the main Gradle project contain the OSGi metadata was to use something like Bnd in its Gradle build?

I'm not sure how big this change would be but it honestly shouldn't be more than having a bnd file for the main jar and its sources with a bit of tweaking. This would enable the Buildship project to drop the project that is just used to create the Bundle.

I was using the Gradle Tooling API multiple times already in the context of Eclipse for testing on its own and always used the main Gradle project artifact and had to add the OSGi metadata on my side, which was a bit cumbersome.

@rgrunber
Copy link
Contributor

rgrunber commented Nov 26, 2024

Does the bundle require another license review ? When running the license check from JDT-LS I get :

[INFO] License information could not be automatically verified for the following content:
[INFO] 
[INFO] p2/orbit/p2.eclipse.plugin/org.gradle.toolingapi/8.9.0.v20241104-0945-s
[INFO] 
[INFO] This content is either not correctly mapped by the system, or requires review.

Update: https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab/-/issues/17435 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants