Skip to content
This repository has been archived by the owner on Jun 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from touchlab/kpg/cleaning_api_2
Browse files Browse the repository at this point in the history
Kpg/cleaning api 2
  • Loading branch information
kpgalligan authored Nov 6, 2019
2 parents 5fcff43 + a3a0d4c commit 8121dbe
Show file tree
Hide file tree
Showing 257 changed files with 13,029 additions and 1,251 deletions.
19 changes: 19 additions & 0 deletions .idea/$PRODUCT_WORKSPACE_FILE$

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/artifacts/FirestoreKMP_js_0_0_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/artifacts/FirestoreKMP_jvm_0_0_1.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

124 changes: 0 additions & 124 deletions .idea/uiDesigner.xml

This file was deleted.

37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,36 @@
# Mach 7 for Android
# Firestore SDK for Kotlin Multiplatform

Library wrapping the Firestore SDK for Kotlin Multiplatform with clients for Android and iOS. Shared common code can
run methods that get delegated to the platform specific SDKs.

This was originally for a client and now is being used as an example library for a talk on KMP libraries. We'll probably
archive this pretty soon because it'll be a lot of support.

## Usage

Use Koltin 1.3.50.

Dependency config

```groovy
sourceSets {
commonMain {
dependencies {
implementation 'co.touchlab:firestore:0.2.5'
}
}
}
```

You'll need to config both Android and iOS as you normally would for Firestore, but then you should be able to get the
Firestore instance like this.

```kotlin
getFirebaseInstance()
```

Then you can do Firestore things.

## Droidcon

[See live example here](https://github.com/touchlab/DroidconKotlin/blob/master/sessionize/lib/src/commonMain/kotlin/co/touchlab/sessionize/SponsorModel.kt#L25)
17 changes: 5 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

apply plugin: 'androidx.navigation.safeargs'


android {
compileSdkVersion 28
buildToolsVersion "29.0.0"
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "co.touchlab.firebase.firestore.test"
applicationId "co.touchlab.firebase.firestore"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
Expand Down Expand Up @@ -41,18 +36,16 @@ dependencies {
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0-RC"

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

implementation "androidx.navigation:navigation-fragment-ktx:2.1.0-alpha06"
implementation "androidx.navigation:navigation-ui-ktx:2.1.0-alpha06"

implementation 'com.google.firebase:firebase-firestore:20.1.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-core:17.0.1'

implementation project(':firebase')
implementation project(':firestore')
}

apply plugin: 'com.google.gms.google-services'
1 change: 0 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:name=".MainApp"
>
<activity android:name=".MainActivity">
<intent-filter>
Expand Down
Loading

0 comments on commit 8121dbe

Please sign in to comment.