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

THRIFT-5545: use gradle convention in organizing java project #2546

Closed
wants to merge 4 commits into from

Conversation

Jimexist
Copy link
Member

@Jimexist Jimexist commented Mar 11, 2022

Currently the directory layout of lib/java is:

❯ tree -L 2
.
├── CMakeLists.txt
├── Makefile.am
├── Makefile.in
├── README.md
├── android
│   ├── build.gradle
│   ├── settings.gradle
│   └── src
├── build.gradle
├── code_quality_tools
│   └── findbugs-filter.xml
├── coding_standards.md
├── gradle
│   ├── additionalArtifacts.gradle
│   ├── cloverCoverage.gradle
│   ├── codeQualityChecks.gradle
│   ├── environment.gradle
│   ├── functionalTests.gradle
│   ├── generateTestThrift.gradle
│   ├── publishing.gradle
│   ├── sourceConfiguration.gradle
│   ├── unitTests.gradle
│   └── wrapper
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── src
│   └── org
└── test
    ├── org
    └── resources

With a customized gradle config but in fact we can adjust it to the conventional setup:

❯ tree -L 2
.
├── CMakeLists.txt
├── Makefile.am
├── Makefile.in
├── README.md
├── android
│   ├── build.gradle
│   ├── settings.gradle
│   └── src
├── build.gradle
├── code_quality_tools
│   └── findbugs-filter.xml
├── coding_standards.md
├── gradle
│   ├── additionalArtifacts.gradle
│   ├── cloverCoverage.gradle
│   ├── codeQualityChecks.gradle
│   ├── environment.gradle
│   ├── functionalTests.gradle
│   ├── generateTestThrift.gradle
│   ├── publishing.gradle
│   ├── sourceConfiguration.gradle
│   ├── unitTests.gradle
│   └── wrapper
├── gradle.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── src
    ├── crossTest
    ├── main
    └── test

i.e. src/{main,test}/{java,resources} so we can remove the customizations.

Official doc https://docs.gradle.org/current/userguide/organizing_gradle_projects.html

Screen Shot 2022-04-19 at 17 11 45

  • Did you create an Apache Jira ticket? (not required for trivial changes)
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

@@ -36,7 +36,7 @@ buildscript {
}

plugins {
id 'java'
id 'java-library'
Copy link
Member Author

Choose a reason for hiding this comment

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

@Jimexist Jimexist marked this pull request as draft March 11, 2022 04:35
@Jimexist Jimexist marked this pull request as ready for review March 29, 2022 02:47
@Jimexist Jimexist changed the title use gradle convention in organizing java project THRIFT-5545: use gradle convention in organizing java project Apr 2, 2022
Copy link
Member

@ctubbsii ctubbsii left a comment

Choose a reason for hiding this comment

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

LGTM

@Jimexist
Copy link
Member Author

had to rebase onto master because of merge conflict

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