Skip to content

Commit 29eecff

Browse files
authored
Removed deprecated fabric #2 (#28)
* Remove deprecated fabric * Pointing circleCI docker image to specific sha
1 parent 18cfb9f commit 29eecff

File tree

13 files changed

+4
-135
lines changed

13 files changed

+4
-135
lines changed

.circleci/config.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,14 @@ jobs:
77
build:
88
working_directory: ~/kotlin-sample-app
99
docker:
10-
- image: circleci/android:api-28
10+
- image: circleci/android@sha256:b6646fdf7457f61825526e7bfce364d8e533da6ceb1cdb98e371e94348ecc834
1111
environment:
1212
GRADLE_OPTS: -Xmx4g -Dorg.gradle.daemon=false
1313
JVM_OPTS: -Xmx4g
1414
steps:
1515
- checkout
16-
- run: echo "fabric.key=$FABRIC_KEY" >> local.properties
17-
- run: echo "fabric.secret=$FABRIC_SECRET" >> local.properties
1816
- run: echo "marvel.key.public=$MARVEL_KEY_PUBLIC" >> local.properties
1917
- run: echo "marvel.key.private=$MARVEL_KEY_PRIVATE" >> local.properties
20-
- run: echo "signing.key.alias=$SIGNING_KEY_ALIAS" >> local.properties
21-
- run: echo "signing.key.password=$SIGNING_KEY_PASSWORD" >> local.properties
22-
- run: echo "signing.store.file=$SIGNING_STORE_FILE" >> local.properties
23-
- run: echo "signing.store.password=$SIGNING_STORE_PASSWORD" >> local.properties
2418
- restore_cache:
2519
key: gradle-{{ checksum "build.gradle.kts" }}
2620
- run:
@@ -31,7 +25,7 @@ jobs:
3125
command: ./gradlew ktlint
3226
- run:
3327
name: Run Lint
34-
command: ./gradlew lintDevDebug
28+
command: ./gradlew lintDevDebug --stacktrace
3529
- run:
3630
name: Run Spotless
3731
command: ./gradlew spotlessKotlinCheck

.gitignore

+1-10
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ captures/
3535

3636
# IntelliJ
3737
*.iml
38-
.idea/workspace.xml
39-
.idea/tasks.xml
40-
.idea/gradle.xml
41-
.idea/assetWizardSettings.xml
42-
.idea/dictionaries
43-
.idea/libraries
44-
.idea/caches
38+
.idea/
4539

4640
# Keystore files
4741
*.keystore
@@ -64,6 +58,3 @@ fastlane/Preview.html
6458
fastlane/screenshots
6559
fastlane/test_output
6660
fastlane/readme.md
67-
68-
# Fabric
69-
Fabric.properties

README.md

+1-18
Original file line numberDiff line numberDiff line change
@@ -49,31 +49,14 @@ The project received different mentions/reference from Android Developer Communi
4949

5050
First off, you require the latest Android Studio 3.5.3 (or newer) to be able to build the app.
5151

52-
You need to supply API keys for the various services the app uses. That is currently Marvel and Fabric (Crashlytics). You can find information about how to gain access via these relevant links.
53-
54-
- Marvel: https://developer.marvel.com/
55-
- Firebase: https://get.fabric.io/
52+
You need to supply keys for Marvel API. You can find information about how to gain access by using the [link](https://developer.marvel.com).
5653

5754
When you obtain the keys, you can provide them to the app by putting the following in the `local.properties` project root file:
5855

5956
```properties
6057
#Marvel API KEYS
6158
marvel.key.public = <insert>
6259
marvel.key.private = <insert>
63-
64-
#Fabric API KEYS
65-
fabric.key = <insert>
66-
fabric.secret = <insert>
67-
```
68-
69-
Moreover, to sign your app for release you should generate an upload key and keystore following the [official documentation](https://developer.android.com/studio/publish/app-signing#sign-apk). Append the information used to generate it into `local.properties` project root file following the structure:
70-
71-
```properties
72-
#Signing Config
73-
signing.key.alias = <insert>
74-
signing.key.password = <insert>
75-
signing.store.file = <insert>
76-
signing.store.password = <insert>
7760
```
7861

7962
### Code style

app/build.gradle.kts

-23
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
import utils.createFabricProperties
1817
import dependencies.Dependencies
1918
import dependencies.DebugDependencies
2019
import dependencies.AnnotationProcessorsDependencies
2120
import extensions.addTestsDependencies
2221
import extensions.implementation
2322
import extensions.debugImplementation
24-
import extensions.getLocalProperty
25-
import extensions.buildConfigBooleanField
2623
import extensions.kapt
2724

2825
plugins {
@@ -34,7 +31,6 @@ plugins {
3431
id(BuildPlugins.NAVIGATION_SAFE_ARGS)
3532
id(BuildPlugins.JACOCO)
3633
id(BuildPlugins.GRAPH_GENERATOR)
37-
id(BuildPlugins.FABRIC)
3834
}
3935

4036
allOpen {
@@ -58,32 +54,18 @@ android {
5854
testInstrumentationRunnerArguments = BuildAndroidConfig.TEST_INSTRUMENTATION_RUNNER_ARGUMENTS
5955
}
6056

61-
signingConfigs {
62-
create(BuildType.RELEASE) {
63-
keyAlias = getLocalProperty("signing.key.alias")
64-
keyPassword = getLocalProperty("signing.key.password")
65-
storeFile = file(getLocalProperty("signing.store.file"))
66-
storePassword = getLocalProperty("signing.store.password")
67-
}
68-
}
69-
7057
buildTypes {
7158
getByName(BuildType.RELEASE) {
7259
proguardFiles("proguard-android-optimize.txt", "proguard-rules.pro")
73-
signingConfig = signingConfigs.getByName(name)
74-
7560
isMinifyEnabled = BuildTypeRelease.isMinifyEnabled
7661
isTestCoverageEnabled = BuildTypeRelease.isTestCoverageEnabled
77-
buildConfigBooleanField("ENABLE_CRASHLYTICS", BuildTypeRelease.isCrashlyticsEnabled)
7862
}
7963

8064
getByName(BuildType.DEBUG) {
8165
applicationIdSuffix = BuildTypeDebug.applicationIdSuffix
8266
versionNameSuffix = BuildTypeDebug.versionNameSuffix
8367
isMinifyEnabled = BuildTypeDebug.isMinifyEnabled
8468
isTestCoverageEnabled = BuildTypeDebug.isTestCoverageEnabled
85-
86-
buildConfigBooleanField( "ENABLE_CRASHLYTICS", BuildTypeDebug.isCrashlyticsEnabled)
8769
}
8870
}
8971

@@ -145,10 +127,6 @@ junitJacoco {
145127
includeNoLocationClasses = true
146128
}
147129

148-
afterEvaluate {
149-
createFabricProperties(this)
150-
}
151-
152130
dependencies {
153131
implementation(project(BuildModules.CORE))
154132

@@ -159,7 +137,6 @@ dependencies {
159137
implementation(Dependencies.NAVIGATION_FRAGMENT)
160138
implementation(Dependencies.TIMBER)
161139
implementation(Dependencies.LOGGING)
162-
implementation(Dependencies.CRASHLYTICS)
163140
implementation(Dependencies.PLAY_CORE)
164141
implementation(Dependencies.DAGGER)
165142

app/src/main/kotlin/com/vmadalin/android/SampleApp.kt

-12
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,12 @@
1717
package com.vmadalin.android
1818

1919
import android.content.Context
20-
import com.crashlytics.android.Crashlytics
2120
import com.google.android.play.core.splitcompat.SplitCompatApplication
2221
import com.vmadalin.android.di.DaggerAppComponent
2322
import com.vmadalin.core.di.CoreComponent
2423
import com.vmadalin.core.di.DaggerCoreComponent
2524
import com.vmadalin.core.di.modules.ContextModule
2625
import com.vmadalin.core.utils.ThemeUtils
27-
import io.fabric.sdk.android.Fabric
2826
import javax.inject.Inject
2927
import kotlin.random.Random
3028
import timber.log.Timber
@@ -62,7 +60,6 @@ class SampleApp : SplitCompatApplication() {
6260
override fun onCreate() {
6361
super.onCreate()
6462
initTimber()
65-
initFabric()
6663
initCoreDependencyInjection()
6764
initAppDependencyInjection()
6865
initRandomNightMode()
@@ -102,15 +99,6 @@ class SampleApp : SplitCompatApplication() {
10299
}
103100
}
104101

105-
/**
106-
* Initialize crash report library Fabric on non debug build.
107-
*/
108-
private fun initFabric() {
109-
if (!BuildConfig.DEBUG) {
110-
Fabric.with(this, Crashlytics())
111-
}
112-
}
113-
114102
/**
115103
* Initialize random nightMode to make developer aware of day/night themes.
116104
*/

buildSrc/build.gradle.kts

-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ repositories {
2525
jcenter()
2626
mavenCentral()
2727
maven("https://oss.sonatype.org/content/repositories/snapshots")
28-
maven("https://maven.fabric.io/public")
2928
maven("https://plugins.gradle.org/m2/")
3029
maven("https://ci.android.com/builds/submitted/5837096/androidx_snapshot/latest/repository")
3130
}
@@ -40,7 +39,6 @@ object PluginsVersions {
4039
const val KOTLIN = "1.3.61"
4140
const val NAVIGATION = "2.1.0"
4241
const val JACOCO = "0.16.0"
43-
const val FABRIC = "1.31.2"
4442
const val DOKKA = "0.10.0"
4543
const val KTLINT = "0.36.0"
4644
const val SPOTLESS = "3.26.1"
@@ -56,7 +54,6 @@ dependencies {
5654
implementation("androidx.navigation:navigation-safe-args-gradle-plugin:${PluginsVersions.NAVIGATION}")
5755
implementation("com.vanniktech:gradle-android-junit-jacoco-plugin:${PluginsVersions.JACOCO}")
5856
implementation("com.vanniktech:gradle-dependency-graph-generator-plugin:${PluginsVersions.GRAPH_GENERATOR}")
59-
implementation("io.fabric.tools:gradle:${PluginsVersions.FABRIC}")
6057
implementation("org.jetbrains.dokka:dokka-gradle-plugin:${PluginsVersions.DOKKA}")
6158
implementation("com.pinterest:ktlint:${PluginsVersions.KTLINT}")
6259
implementation("com.diffplug.spotless:spotless-plugin-gradle:${PluginsVersions.SPOTLESS}")

buildSrc/src/main/kotlin/BuildDependenciesVersions.kt

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ object BuildDependenciesVersions {
3737
const val LOGGING = "4.2.2"
3838
const val MOSHI = "1.9.2"
3939
const val COIL = "0.8.0"
40-
const val CRASHLYTICS = "2.10.1"
4140
const val PLAY_CORE = "1.6.4"
4241
const val LEAKCANARY = "2.0"
4342
const val DATABINDING = "3.1.4"

buildSrc/src/main/kotlin/BuildPlugins.kt

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ object BuildPlugins {
3030
const val NAVIGATION_SAFE_ARGS = "androidx.navigation.safeargs.kotlin"
3131
const val JACOCO = "com.vanniktech.android.junit.jacoco"
3232
const val GRAPH_GENERATOR = "com.vanniktech.dependency.graph.generator"
33-
const val FABRIC = "io.fabric"
3433

3534
const val DETEKT = "plugins.detekt"
3635
const val DOKKA = "plugins.dokka"

buildSrc/src/main/kotlin/BuildTypes.kt

-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ interface BuildType {
2222
}
2323

2424
val isMinifyEnabled: Boolean
25-
val isCrashlyticsEnabled: Boolean
2625
val isTestCoverageEnabled: Boolean
2726
}
2827

2928
object BuildTypeDebug : BuildType {
3029
override val isMinifyEnabled = false
31-
override val isCrashlyticsEnabled = false
3230
override val isTestCoverageEnabled = true
3331

3432
const val applicationIdSuffix = ".debug"
@@ -37,6 +35,5 @@ object BuildTypeDebug : BuildType {
3735

3836
object BuildTypeRelease : BuildType {
3937
override val isMinifyEnabled = true
40-
override val isCrashlyticsEnabled = true
4138
override val isTestCoverageEnabled = false
4239
}

buildSrc/src/main/kotlin/dependencies/Dependencies.kt

-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,5 @@ object Dependencies {
4646
const val MOSHI = "com.squareup.moshi:moshi:${BuildDependenciesVersions.MOSHI}"
4747
const val MOSHI_KTX = "com.squareup.moshi:moshi-kotlin:${BuildDependenciesVersions.MOSHI}"
4848
const val COIL = "io.coil-kt:coil:${BuildDependenciesVersions.COIL}"
49-
const val CRASHLYTICS = "com.crashlytics.sdk.android:crashlytics:${BuildDependenciesVersions.CRASHLYTICS}"
5049
const val PLAY_CORE = "com.google.android.play:core:${BuildDependenciesVersions.PLAY_CORE}"
5150
}

buildSrc/src/main/kotlin/extensions/RepositoryHandlerExtensions.kt

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ fun RepositoryHandler.applyDefault() {
2727
jcenter()
2828
mavenCentral()
2929
maven("https://oss.sonatype.org/content/repositories/snapshots")
30-
maven("https://maven.fabric.io/public")
3130
maven("https://plugins.gradle.org/m2/")
3231
maven("https://ci.android.com/builds/submitted/5837096/androidx_snapshot/latest/repository")
3332
}

buildSrc/src/main/kotlin/utils/CrashlyticsUtils.kt

-53
This file was deleted.

core/build.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ dependencies {
6262
implementation(Dependencies.LOGGING)
6363
implementation(Dependencies.MOSHI)
6464
implementation(Dependencies.MOSHI_KTX)
65-
implementation(Dependencies.CRASHLYTICS)
6665

6766
kapt(AnnotationProcessorsDependencies.DATABINDING)
6867
kapt(AnnotationProcessorsDependencies.ROOM)

0 commit comments

Comments
 (0)