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

[Android] Add Gradle repository that translates to Java GN targets #9996

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

austinh0
Copy link
Contributor

@austinh0 austinh0 commented Sep 27, 2021

Problem

  • Android projects typically use Gradle to manage dependencies. CHIP Java code uses GN, so we can't easily add the Android dependencies we want.

Change overview

  • Add a Gradle repository in third_party/android_deps, with tasks defined in build.gradle and deps defined in android_deps.gradle.
  • Add set_up_android_deps.py, which invokes Gradle to downloads JARs and generates a BUILD.gn from Gradle's dependency graph. Made this script a step in the Android scripts and IDE build.
  • Add dependency on androidx.annotation, and use @Nullable in ChipDeviceController as proof of concept.

Testing

@woody-apple
Copy link
Contributor

third_party/android_deps/set_up_android_deps.py Outdated Show resolved Hide resolved
third_party/android_deps/set_up_android_deps.py Outdated Show resolved Hide resolved
@austinh0 austinh0 merged commit 77a9f6a into project-chip:master Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants