Skip to content

Commit a1fffa6

Browse files
author
Michael Klimushyn
authored
[multiple] V2 embedding plugins use compileOnly (flutter#2232)
Fixes possible version conflict issues. This would cause runtime class not found errors if any of these plugins relied on `Lifecycle` at runtime, but they do not. Test is pending in flutter/plugin_tools#62.
1 parent 63b4e6b commit a1fffa6

File tree

33 files changed

+98
-44
lines changed

33 files changed

+98
-44
lines changed

packages/android_intent/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.3.4+4
2+
3+
* Include lifecycle dependency as a compileOnly one on Android to resolve
4+
potential version conflicts with other transitive libraries.
5+
16
## 0.3.4+3
27

38
* Android: Use android.arch.lifecycle instead of androidx.lifecycle:lifecycle in `build.gradle` to support apps that has not been migrated to AndroidX.

packages/android_intent/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ afterEvaluate {
7575
android {
7676
dependencies {
7777
def lifecycle_version = "1.1.1"
78-
api "android.arch.lifecycle:runtime:$lifecycle_version"
79-
api "android.arch.lifecycle:common:$lifecycle_version"
80-
api "android.arch.lifecycle:common-java8:$lifecycle_version"
78+
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
79+
compileOnly "android.arch.lifecycle:common:$lifecycle_version"
80+
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
8181
}
8282
}
8383
}

packages/android_intent/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: android_intent
22
description: Flutter plugin for launching Android Intents. Not supported on iOS.
33
author: Flutter Team <flutter-dev@googlegroups.com>
44
homepage: https://github.com/flutter/plugins/tree/master/packages/android_intent
5-
version: 0.3.4+3
5+
version: 0.3.4+4
66

77
flutter:
88
plugin:

packages/battery/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.3.1+2
2+
3+
* Include lifecycle dependency as a compileOnly one on Android to resolve
4+
potential version conflicts with other transitive libraries.
5+
16
## 0.3.1+1
27

38
* Android: Use android.arch.lifecycle instead of androidx.lifecycle:lifecycle in `build.gradle` to support apps that has not been migrated to AndroidX.

packages/battery/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ afterEvaluate {
6464
android {
6565
dependencies {
6666
def lifecycle_version = "1.1.1"
67-
api "android.arch.lifecycle:runtime:$lifecycle_version"
68-
api "android.arch.lifecycle:common:$lifecycle_version"
69-
api "android.arch.lifecycle:common-java8:$lifecycle_version"
67+
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
68+
compileOnly "android.arch.lifecycle:common:$lifecycle_version"
69+
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
7070
}
7171
}
7272
}

packages/battery/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for accessing information about the battery state
33
(full, charging, discharging) on Android and iOS.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
6-
version: 0.3.1+1
6+
version: 0.3.1+2
77

88
flutter:
99
plugin:

packages/camera/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.5.6+2
2+
3+
* Include lifecycle dependency as a compileOnly one on Android to resolve
4+
potential version conflicts with other transitive libraries.
5+
16
## 0.5.6+1
27

38
* Android: Use android.arch.lifecycle instead of androidx.lifecycle:lifecycle in `build.gradle` to support apps that has not been migrated to AndroidX.

packages/camera/android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ afterEvaluate {
7979
android {
8080
dependencies {
8181
def lifecycle_version = "1.1.1"
82-
api "android.arch.lifecycle:runtime:$lifecycle_version"
83-
api "android.arch.lifecycle:common:$lifecycle_version"
84-
api "android.arch.lifecycle:common-java8:$lifecycle_version"
82+
compileOnly "android.arch.lifecycle:runtime:$lifecycle_version"
83+
compileOnly "android.arch.lifecycle:common:$lifecycle_version"
84+
compileOnly "android.arch.lifecycle:common-java8:$lifecycle_version"
8585
}
8686
}
8787
}

packages/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera
22
description: A Flutter plugin for getting information about and controlling the
33
camera on Android and iOS. Supports previewing the camera feed, capturing images, capturing video,
44
and streaming image buffers to dart.
5-
version: 0.5.6+1
5+
version: 0.5.6+2
66

77
authors:
88
- Flutter Team <flutter-dev@googlegroups.com>

packages/connectivity/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.4.5+2
2+
3+
* Include lifecycle dependency as a compileOnly one on Android to resolve
4+
potential version conflicts with other transitive libraries.
5+
16
## 0.4.5+1
27

38
* Android: Use android.arch.lifecycle instead of androidx.lifecycle:lifecycle in `build.gradle` to support apps that has not been migrated to AndroidX.

0 commit comments

Comments
 (0)