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

build: Kotlin DSL / Convention Plugins / Java Modules #1732

Merged
merged 86 commits into from
Jul 9, 2024
Merged

Conversation

jjohannes
Copy link
Contributor

@jjohannes jjohannes commented Feb 19, 2024

Description:

This PR does the full package of Gradle + Java Module updates similar to what we did in hedera-services:

  • All Gradle config is now in Kotlin DSL
  • Gradle config done in convention plugins
  • Latest Gradle Version 8.8
  • Update io.grpc:* dependencies to 1.64.0 (to be Java Module compatible)
  • Configuration Cache enabled
  • Integration tests and example classes are moved into packages to make them Java Module compatible
  • Integration tests and samples run on Module Path when executed via Gradle (locally or on CI)
  • module-info.java files added to sdk/main, sdk/integrationTest and examples
  • Dependencies are declared in module-info.java and scope is defined according to checkAllModuleInfo
  • Versions are centrally declared in separate block in sdk-dependency-versions/build.gradle.kts
  • Building the sdk-full variant is now fully done in Gradle through a separate sdk-full project that has a separate module-info (exchanging requires grpc.protobuf.lite for requires grpc.protobuf) but otherwise re-uses sources and proto buffs from the sdk/main sources folder.
  • The sdk and sdk-full are now both published by the Gradle build in the one publishing run
  • Cleanup: remove config files for no longer used build/ci solutions (Built, GitLab)

Side-effects:

  • io.grpc:grpc-netty-shaded in client project is automatically aligned with the grpc-api version we use

Manual Testing (for things not covered by the automatic tests):

  • I tested that the Android app example still builds and runs
  • I tested the publishing by temporarily adding a local repository

Follow ups:

@jjohannes jjohannes changed the title Build: start moving config to Kotlin DSL and Convention Plugins Build: Use Kotlin DSL and Convention Plugins Feb 19, 2024
@jjohannes jjohannes force-pushed the gradle-updates branch 10 times, most recently from 06771f8 to c32db9d Compare February 20, 2024 16:08
@hashgraph hashgraph deleted a comment from sonarqubecloud bot Feb 20, 2024
@jjohannes jjohannes changed the title Build: Use Kotlin DSL and Convention Plugins build: Kotlin DSL / Convention Plugins / Java Modules Feb 22, 2024
@jjohannes jjohannes marked this pull request as ready for review February 22, 2024 11:23
@jjohannes jjohannes self-assigned this Feb 29, 2024
@nathanklick
Copy link
Member

@jjohannes Please rebase this PR when you get a chance. The team is ready to review and merge.

@jjohannes jjohannes force-pushed the gradle-updates branch 2 times, most recently from d659795 to d7bb746 Compare March 14, 2024 11:38
@jjohannes
Copy link
Contributor Author

@nathanklick rebased and ready for review

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@SimiHunjan SimiHunjan added this to the 2.32.0 milestone Mar 18, 2024
@thenswan
Copy link
Contributor

I merged PR related to the docs update (recommend to check it out), and we have a doc on creating a fat/uber JAR based on the user's request. Would like to ask if is it possible for jar creation to be done as a convention plugin (like in hedera-services)?

@thenswan
Copy link
Contributor

Proposing change com.hedera.hashgraph.sdk.integration.test to com.hedera.hashgraph.sdk.test.integration.

jjohannes and others added 4 commits July 4, 2024 20:27
As soon as you declare capabilities, the default capability is no
longer added automatically. This can lead to really weird variant
matching issues.

Signed-off-by: Jendrik Johannes <[email protected]>
@thenswan thenswan requested a review from 0xivanov July 8, 2024 16:07
Copy link
Contributor

@thenswan thenswan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Copy link

sonarqubecloud bot commented Jul 8, 2024

Copy link
Contributor

@agadzhalov agadzhalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tyvm @jjohannes and @thenswan 🙏🚀

Copy link
Contributor

@rbarkerSL rbarkerSL left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just one minor comment on some comments.

@thenswan thenswan merged commit 9012a3d into main Jul 9, 2024
8 checks passed
@thenswan thenswan deleted the gradle-updates branch July 9, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove (or optimize) environment variables check
8 participants