Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5545

Follow newer gradle convention in organizing source code directories

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.17.0
    • Java - Library
    • None

    Description

      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
          ├── main
          └── test

       

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

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

      Attachments

        Activity

          People

            jiayuliu Liu Jiayu
            jiayuliu Liu Jiayu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m