git clone https://github.com/segment-integrations/analytics-android-integration-firebase
Navigate to File
=> New
=> Import Module...
open the file path in the Source Directory
and rename the module e.g firebase
Mono-repo: https://github.com/segmentio/analytics-android-integrations
.circleci/
.github/
integrations/
amplitude/
firebase/ <-- here
sampleapp/
README.md
LICENSE.md
etc.
project:settings.gradle
include ':integrations:firebase'
gradle
, .circleci
folders, .gitignore
and if .buildscript
and github
folders in the module directory because these folders are already in the project
level
integrations/
firebase/
.buildscript/ <-- this
.circleci/ <-- this
github/ <-- this
gradle/ <-- this
src/
build.gradle
.gitignore <-- this
README.md
etc
6. Remove the promote gradle plugin in the destination because it has already been implemented in the project level
firebase:build.gradle
apply from: rootProject.file('gradle/promote.gradle')
firebase:build.gradle
apply from: rootProject.file('spotless.gradle')
8. Apply dependencies.gradle
in the destination. The dependencies.gradle
is used to manage all dependency versions
firebase:build.gradle
apply from: rootProject.file('dependencies.gradle')
firebase:build.gradle
apply from: rootProject.file('dependencies.gradle')
android {
compileSdkVersion versions.compileSdkVersion
buildToolsVersion versions.buildTools
defaultConfig {
minSdkVersion versions.minSdkVersion
targetSdkVersion versions.targetSdkVersion
}
....
}
dependencies {
api 'com.segment.analytics.android:analytics:' + versions.anayticsSdkVersion
testImplementation 'org.mockito:mockito-core:' + versions.mockitoVersion
}
10. Remove buildscripts and dependencies {repositories} block in the destination build.gradle, because it has already been implemented in the project level
firebase:build.gradle
buildscript { <--- start
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
}
} <--- end
....
dependencies {
repositories { <--- start
mavenCentral()
....
} <--- end
....
}
./gradlew test
./gradlew spotlessApply