Bug 1670261 - Re-export the Glean Kotlin bindings from GeckoView. r=agi

This also upgrades to Kotlin 1.3.50, which is required to due Glean
requirements. Fenix is already on 1.4, so that's no problem.

We also turn the geckoview_example into a multiDex application.
Otherwise we run into the 64k dex symbols size limit.

Differential Revision: https://phabricator.services.mozilla.com/D116601
This commit is contained in:
Jan-Erik Rediger 2021-08-10 07:49:08 +00:00
Родитель a8c5939ae3
Коммит b2808bbfce
4 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@ -71,7 +71,7 @@ buildscript {
}
}
ext.kotlin_version = '1.3.41'
ext.kotlin_version = '1.3.50'
dependencies {
classpath 'org.mozilla.apilint:apilint:0.4.1'

Просмотреть файл

@ -227,6 +227,12 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
}
}
configurations {
// No need to include libglean_ffi.so here or for GeckoView consumers.
// If those consumers use Glean, they'll get the FFI through GeckoView anyway.
all*.exclude group: 'org.mozilla.telemetry', module: 'glean-native'
}
dependencies {
// For exoplayer.
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
@ -234,6 +240,9 @@ dependencies {
compileOnly "org.checkerframework:checker-qual:2.5.0"
compileOnly "org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.70"
// The Glean Kotlin, which will be re-exported.
api "org.mozilla.telemetry:glean:36.0.1"
implementation "androidx.annotation:annotation:1.1.0"
implementation "androidx.legacy:legacy-support-v4:1.0.0"

Просмотреть файл

@ -16,6 +16,8 @@ android {
applicationId "org.mozilla.geckoview_example"
versionCode 1
versionName "1.0"
multiDexEnabled true
}
compileOptions {
@ -56,4 +58,6 @@ dependencies {
implementation project(path: ':geckoview')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.multidex:multidex:2.0.0'
}

Просмотреть файл

@ -16,7 +16,8 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:icon="@drawable/logo">
android:icon="@drawable/logo"
android:name="androidx.multidex.MultiDexApplication">
<uses-library android:name="android.test.runner"
android:required="false"/>