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 force-pushed the use-gradle-convention-dir branch from dfd93c1 to c5d937a Compare March 29, 2022 02:44
@jimexist jimexist marked this pull request as ready for review March 29, 2022 02:47
@jimexist jimexist force-pushed the use-gradle-convention-dir branch from c5d937a to 351565a Compare April 2, 2022 02:52
@jimexist jimexist changed the title use gradle convention in organizing java project THRIFT-5545: use gradle convention in organizing java project Apr 2, 2022
@jimexist jimexist force-pushed the use-gradle-convention-dir branch from 351565a to f69d01c Compare April 18, 2022 15:03
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 jimexist force-pushed the use-gradle-convention-dir branch from b7be498 to eb08f00 Compare April 19, 2022 07:09
@jimexist jimexist force-pushed the use-gradle-convention-dir branch from eb08f00 to a53a3e3 Compare April 19, 2022 07:10
@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
Development

Successfully merging this pull request may close these issues.

2 participants