Skip to content

update repositories. No more maven.fabric.io! #99

@spatial25

Description

@spatial25

I am using linux but not ubuntu and was able to get a successful build. I am sharing the files. Changes were with updating the repository because maven.fabric.io no longer works.
All changes were in the mobile, shared, wear build.gradle files, and :mobile/utils/MainActivity.kt.

Files Mentioned

I'm using android studio bumblebee.

In /wear/build.gradle:
[Might be better to use the 1.3.72, I was having problems with 1.5.30. You could probably mess with different repositories to update kotlin to 1.5.30.]

buildscript {} update ext.kotlin_version to "1.3.72"

New repository are:
maven { url 'https://mvnrepository.com/artifact' }
maven { url 'https://repo1.maven.org/maven2' }

These are the dependencies I put:
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
}
allprojects {
repositories {
maven { url 'https://mvnrepository.com/artifact' }
google()
jcenter() [jcenter no longer is supported but keep on because it prevents errors on MainActivity.kt]
Add mavenCentral()
}

At the very end:
ext {
minSdkVersion = 19
targetSdkVersion = 29
compileSdkVersion = 29
buildToolsVersion = "27.0.3"
kotlinVersion = "1.3.72"
supportVersion = "28.0.0"
}

/shared/build.gradle:
add apply plugin: 'org.jetbrains.kotlin.kapt'

in /mobile/build.gradle:
apply plugin: 'com.android.application'
//apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
add apply plugin: 'org.jetbrains.kotlin.kapt' [maybe redundant or vice versa]

repositories {
google()
jcenter()
Add mavenCentral()
maven { url 'https://mvnrepository.com/artifact' }
}

[remove crashlytics and add two implementations below]
//implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
// transitive = true
Add
implementation 'com.google.firebase:firebase-crashlytics:18.2.1'
implementation 'com.google.firebase:firebase-analytics:19.0.1'

In the MainActivity.kt:
Remove import com.crashlytics.sdk.android and
import io.fabric.sdk.android.Fabric

Add import com.google.firebase.crashlytics.FirebaseCrashlytics;

Remove Fabric.with(this, Crashlytics())
and Add FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true)

Those are the major changes and I was able to get a successful build with no errors with only 5 warnings on new mapping. There are small upgrades to numbers that I didn't add but will be on the files.

Rick

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions