Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Use org.mozilla.appservices Gradle plugin to consume megazord lib (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalexan authored and sashei committed Jan 11, 2019
1 parent 993d8a3 commit 7c81b7a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ plugins {
id 'kotlin-android-extensions'
id 'kotlin-android'
id 'io.sentry.android.gradle'
id 'org.mozilla.appservices'
}

android {
Expand Down Expand Up @@ -122,6 +123,12 @@ dependencies {
ktlint "com.github.shyiko:ktlint:0.28.0"
}

appservices {
defaultConfig {
megazord = 'lockbox'
}
}

def outputDir = "${project.buildDir}/reports/ktlint/"

task ktlint(type: JavaExec, group: "verification", description: "Runs ktlint.") {
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/mozilla/lockbox/LockboxApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.squareup.leakcanary.LeakCanary
import io.sentry.Sentry
import io.sentry.android.AndroidSentryClientFactory
import kotlinx.coroutines.ExperimentalCoroutinesApi
import mozilla.appservices.LockboxMegazord
import mozilla.components.support.base.log.Log
import mozilla.components.support.base.log.logger.Logger
import mozilla.components.support.base.log.sink.AndroidLogSink
Expand Down Expand Up @@ -53,6 +54,8 @@ class LockboxApplication : Application() {
}

private fun setupDataStoreSupport() {
LockboxMegazord.init()

// this needs to be done after injectContext, as
// SyncDataStoreSupport needs to find the database
// path from the context
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.10'
classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
classpath 'org.mozilla.appservices:gradle-plugin:0.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down

0 comments on commit 7c81b7a

Please sign in to comment.