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

Add dependency vendoring support. #1821

Merged
merged 3 commits into from
Aug 18, 2020
Merged

Add dependency vendoring support. #1821

merged 3 commits into from
Aug 18, 2020

Conversation

vkryachko
Copy link
Member

@vkryachko vkryachko commented Jul 24, 2020

The VendorPlugin(applied with id 'firebase-vendor') adds a dedicated
vendor gradle configuration to the project, which can be used to
include the dependencies in the output library. Such dependencies are
are shaded under the library's package name to avoid symbol collisions.

Example use:

plugins {
  id("com.android.library")
  id("firebase-vendor")
}

android {
  // ...
}

dependencies {
  implementation("com.example:somelib:1.0")

  // this will make this library available at compile time as well as
  // will vendor it inside the produced aar under `com.mylib.com.example`.
  vendor("com.example:libtovendor:1.0") {
    // IMPORTANT: if the library (transitively) depends on any library
    // that contains `javax` or `java` packages, it must be excluded here
    // and added as a pom dependency below.
    exclude("javax.inject", "javax.inject")
  }
  implementation("javax.inject:javax.inject:1")
}

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 24, 2020

Coverage Report

Affected SDKs

  • firebase-database

    SDK overall coverage changed from 51.10% (8c187fd) to 51.11% (8dc0c0d3) by +0.01%.

    Filename Base (8c187fd) Head (8dc0c0d3) Diff
    BooleanNode.java 100.00% 92.31% -7.69%
    ChildChangeAccumulator.java 83.33% 96.67% +13.33%
    DoubleNode.java 100.00% 88.24% -11.76%
  • firebase-inappmessaging-display

    SDK overall coverage changed from 33.51% (8c187fd) to 33.49% (8dc0c0d3) by -0.02%.

    Filename Base (8c187fd) Head (8dc0c0d3) Diff
  • firebase-messaging

    SDK overall coverage changed from ? (8c187fd) to 83.77% (8dc0c0d3) by ?.

    Click to show coverage changes in 23 files.
    Filename Base (8c187fd) Head (8dc0c0d3) Diff
    CommonNotificationBuilder.java ? 91.63% ?
    Constants.java ? 92.86% ?
    DisplayNotification.java ? 91.38% ?
    EnhancedIntentService.java ? 80.00% ?
    ExecutorFactory.java ? 0.00% ?
    FcmExecutors.java ? 85.71% ?
    FirebaseMessaging.java ? 66.67% ?
    FirebaseMessagingRegistrar.java ? 83.33% ?
    FirebaseMessagingService.java ? 94.79% ?
    FirelogAnalyticsEvent.java ? 26.67% ?
    ImageDownload.java ? 87.18% ?
    MessagingAnalytics.java ? 63.93% ?
    NotificationParams.java ? 98.71% ?
    PoolableExecutors.java ? 29.17% ?
    RemoteMessage.java ? 98.67% ?
    RemoteMessageCreator.java ? 88.89% ?
    SendException.java ? 100.00% ?
    SharedPreferencesQueue.java ? 98.44% ?
    ThreadPriority.java ? 100.00% ?
    TopicOperation.java ? 90.00% ?
    TopicsStore.java ? 100.00% ?
    TopicsSubscriber.java ? 89.66% ?
    TopicsSyncTask.java ? 53.33% ?
  • firebase-storage

    SDK overall coverage changed from 85.57% (8c187fd) to 85.44% (8dc0c0d3) by -0.13%.

    Filename Base (8c187fd) Head (8dc0c0d3) Diff
    StorageException.java 69.09% 65.45% -3.64%
    StorageTask.java 84.59% 84.29% -0.30%
    StreamDownloadTask.java 88.89% 88.41% -0.48%
    UploadTask.java 79.85% 80.22% +0.37%

Test Logs

Notes

HTML coverage reports can be produced locally with ./gradlew <product>:checkCoverage.
Report files are located at <product-build-dir>/reports/jacoco/.

Head commit (8dc0c0d3) is created by Prow via merging commits: 8c187fd 30db30b.

@vkryachko
Copy link
Member Author

/run binary-size

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 24, 2020

Binary Size Report

Affected SDKs

  • firebase-crashlytics

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 324 kB 324 kB +77 B (+0.0%)
    apk (release) 1.04 MB 1.04 MB +605 B (+0.1%)
  • firebase-crashlytics-ktx

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 339 kB 339 kB +21 B (+0.0%)
    apk (release) 1.57 MB 1.57 MB +497 B (+0.0%)
  • firebase-crashlytics-ndk

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 1.81 MB 1.81 MB -163 B (-0.0%)
    apk (release) 2.52 MB 2.52 MB -167 B (-0.0%)
  • firebase-datatransport

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 109 kB 109 kB +69 B (+0.1%)
    apk (release) 689 kB 690 kB +897 B (+0.1%)
  • firebase-inappmessaging

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    aar 441 kB 472 kB +30.4 kB (+6.9%)
    apk (aggressive) 611 kB 611 kB +389 B (+0.1%)
    apk (release) 3.28 MB 3.29 MB +7.70 kB (+0.2%)
  • firebase-inappmessaging-display

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    aar 168 kB 200 kB +31.9 kB (+19.0%)
    apk (aggressive) 1.42 MB 1.42 MB +753 B (+0.1%)
    apk (release) 4.52 MB 4.52 MB +8.68 kB (+0.2%)
  • firebase-inappmessaging-display-ktx

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 1.43 MB 1.44 MB +757 B (+0.1%)
    apk (release) 5.06 MB 5.07 MB +8.83 kB (+0.2%)
  • firebase-inappmessaging-ktx

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 626 kB 626 kB +381 B (+0.1%)
    apk (release) 3.82 MB 3.83 MB +6.63 kB (+0.2%)
  • firebase-installations

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    aar 59.2 kB 59.2 kB -7 B (-0.0%)
  • firebase-messaging

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 493 kB 493 kB +61 B (+0.0%)
    apk (release) 2.43 MB 2.43 MB +133 B (+0.0%)
  • firebase-messaging-directboot

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 408 kB 408 kB +41 B (+0.0%)
    apk (release) 2.31 MB 2.31 MB +353 B (+0.0%)
  • transport-backend-cct

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    apk (aggressive) 45.6 kB 45.7 kB +93 B (+0.2%)
    apk (release) 81.5 kB 81.9 kB +409 B (+0.5%)
  • transport-runtime

    Type Base (8c187fd) Head (8dc0c0d3) Diff
    aar 128 kB 160 kB +32.4 kB (+25.3%)
    apk (aggressive) 33.0 kB 33.1 kB +93 B (+0.3%)
    apk (release) 62.6 kB 63.1 kB +533 B (+0.9%)

Test Logs

Notes

Head commit (8dc0c0d3) is created by Prow via merging commits: 8c187fd 30db30b.

The `VendorPlugin`(applied with `id 'firebase-vendor'`) adds a dedicated
`vendor` gradle configuration to the project, which can be used to
include the dependencies in the output library. Such dependencies are
are shaded under the library's package name to avoid symbol collisions.

Example use:
```kotlin
plugins {
  id("com.android.library")
  id("firebase-vendor")
}

android {
  // ...
}

dependencies {
  implementation("com.example:somelib:1.0")

  // this will make this library available at compile time as well as
  // will vendor it inside the produced aar under `com.mylib.com.example`.
  vendor("com.example:libtovendor:1.0") {
    // IMPORTANT: it the library (transitively) depends on any library
    that contains `javax` or `java` packages, it must be excluded here
    and added as a pom dependency below.
    exclude("javax.inject", "javax.inject")
  }
  implementation("javax.inject:javax.inject:1")
}
```
@vkryachko
Copy link
Member Author

/retest

1 similar comment
@vkryachko
Copy link
Member Author

/retest

@vkryachko vkryachko requested a review from rlazo August 18, 2020 19:52
@google-oss-bot
Copy link
Contributor

@vkryachko: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
smoke-tests 30db30b link /test smoke-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@vkryachko vkryachko merged commit 2843bea into master Aug 18, 2020
@firebase firebase locked and limited conversation to collaborators Sep 18, 2020
@vkryachko vkryachko deleted the vk.vendor branch October 20, 2020 21:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes Override cla size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants