Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B buck
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 201
    • Issues 201
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 22
    • Merge requests 22
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • buck
  • Merge requests
  • !209

Improved Gradle-Android project's integration in Intellij

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/FrancisToth/master_fork into master Oct 17, 2014
  • Overview 8
  • Commits 8
  • Pipelines 0
  • Changes 42

Created by: FrancisToth

The following improvements have been made :

  • Settings have been added to define default Java settings used across a project's modules. These settings are used to generate the file ".idea/misc.xml" required by Intellij
[java]
    # defines the java language level used across a project's different modules
    language_level=JDK_1_6

    # defines the JDK name used by the project in Intellij (depends on your environment)
    jdk_name=Android API 19 Platform 

    # defines the type of JDK used inside the project (eg. Python SDK, JavaSDK, Python SDK...)
    jdk_type=Android SDK
  • Configuration parameters have also been added to improve Android-Gradle projects to Buck. This give more flexibility in the way a module's iml file is generated. By default, Buck considers that assets, the AndroidManifest and the resources are at the project's root. However, with Gradle, they're usually in : [root]/src/main.

The following settings allow to tune these path and to set them according the project's file hierarchy :

[project]

# defines each library's Manifest relative path (by default set to '/AndroidManifest.xml')
default_android_manifest_path = /src/main/AndroidManifest.xml

# defines each library's resource folder relative path (by default set to '/res')
default_android_resource_path = /src/main/res

# defines each library's assets folder relative path (by default set to '/assets')
default_android_assets_path = /src/main/assets
  • Finally, some fixes have been done in order to improve prebuilt AAR's integration with Intellij. Formerly, generating the project file of a module having an AAR as a dependency could introduce duplicate entries inside the resulted iml file. Everything related to a prebuilt AAR is now stored in .idea/libraries/[library's name].xml :
<component name="libraryTable">
  <library name="__third_party_viewpagerindicator">
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/buck-out/bin/third-party/__uber_classes_[aarname]#aar_unzip__/classes.jar!/" />
      <root url="file://$PROJECT_DIR$/buck-out/bin/third-party/__unpack_[aarname]#aar_unzip__/res" />
      <root url="file://$PROJECT_DIR$/buck-out/bin/third-party/__unpack_[aarname]#aar_unzip__/assets" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/FrancisToth/master_fork