• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Adding the Support Library Build Within Another Build
2
3Sorry, this doesn't seem to be working at the moment.
4For now, run `./gradlew createArchive` and copy the output to where your project can use it, as described fuller in go/support-dev
5
6Would you like to make a change in Support Library and have it be propagated to
7your downstream Gradle build (generally an app) without having to separately
8build Support Library and then build your application?
9
10## To build Support Library as part of your existing Gradle build
11*   To add the Support Library build
12    *   Add `apply(from: '<support-lib-repo-root>/frameworks/support/include-support-library.gradle')`
13        to your settings.gradle
14        *   See [include-support-library.gradle](include-support-library.gradle)
15            for more information
16*   If your project is an Android app, also update some dependencies:
17    *   Open your local.properties file and update the value of `sdk.dir` .
18        *   It should point to `<support-lib-repo-root>/prebuilts/fullsdk-<platform>` .
19        *   For example, `~/support-library/prebuilts/fullsdk-linux` .
20    *   In your build.gradle, update any versions that refer to previous versions of
21        Support Library.
22        *   To determine the correct version, find the SDK with the highest
23            number among SDKs in the Support Library repo.
24
25                echo <support-lib-repo-root>/prebuilts/fullsdk-linux/platforms/android* | xargs -n 1 echo | sed 's/.*android-//' | tail -n 1
26
27            This should output, for example, "28"
28
29        *   Update dependency versions
30            *   For example, you may want to replace
31                `com.android.support:app-compat-v7:26.0.2` with
32                `com.android.support:app-compat-v7:28.0.2`
33        *   Update configuration given to the Android Gradle plugin
34            *   Check `compileSdkVersion` and make sure its version is correct
35
36