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

Update libs #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/misc.xml

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

12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ archive this pretty soon because it'll be a lot of support.

## Usage

Use Koltin 1.3.50.
Use Koltin 1.3.70.

Dependency config

Expand All @@ -31,6 +31,16 @@ getFirebaseInstance()

Then you can do Firestore things.


## UPDATE

To build the project you should the option `-x check` to build gradle command line.

```
./gradlew build -x check
```


## Droidcon

[See live example here](https://github.com/touchlab/DroidconKotlin/blob/master/sessionize/lib/src/commonMain/kotlin/co/touchlab/sessionize/SponsorModel.kt#L25)
20 changes: 10 additions & 10 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0-beta01"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0-alpha01"
implementation 'com.android.support:support-v4:28.0.0'
implementation 'android.arch.lifecycle:extensions:1.1.1'
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"
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.4"

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

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

implementation project(':firestore')
}
Expand Down
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.3.70'

ext.versions = [
'minSdk': 9,
'compileSdk': 28,

'kotlin': '1.3.50',
'kotlin': '1.3.70',

'androidPlugin': '3.4.1',
'androidTools': '29.0.1',
Expand All @@ -17,22 +17,22 @@ buildscript {
'firebaseCoreAndroid': '17.0.1',
'firebaseFirestoreAndroid': '20.1.0',

'stately': '0.9.3',
'coroutines': '1.3.0'

'stately': '1.0.0-a2',
'coroutines': '1.3.4'
]

repositories {
mavenLocal()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
maven { url "https://kotlin.bintray.com/kotlinx" }
google()
jcenter()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:${versions.androidPlugin}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath 'com.google.gms:google-services:4.3.0'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.9.17'

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -44,6 +44,7 @@ allprojects {
repositories {
mavenLocal()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
maven { url "https://kotlin.bintray.com/kotlinx" }
google()
jcenter()
mavenCentral()
Expand Down
6 changes: 3 additions & 3 deletions buildlibrary.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -ev

PODS_ROOT=/Users/kgalligan/devel_kmp/FirestoreKMP/iosApp/Pods
PODS_ROOT=/Users/magnumrocha/personal/FirestoreKMP/iosApp/Pods
./gradlew :firestore:build \
-Pkotlin.native.cocoapods.target=ios_x64 \
-Pkotlin.native.cocoapods.paths.headers="/Users/kgalligan/devel_kmp/FirestoreKMP/iosApp/Pods/Headers/Public" \
-Pkotlin.native.cocoapods.paths.frameworks="/Users/kgalligan/devel_kmp/FirestoreKMP/iosApp/Pods/FirebaseCore /Users/kgalligan/devel_kmp/FirestoreKMP/iosApp/Pods/FirebaseFirestore"
-Pkotlin.native.cocoapods.paths.headers="/Users/magnumrocha/personal/FirestoreKMP/iosApp/Pods/Headers/Public" \
-Pkotlin.native.cocoapods.paths.frameworks="/Users/magnumrocha/personal/FirestoreKMP/iosApp/Pods/FirebaseCore /Users/magnumrocha/personal/FirestoreKMP/iosApp/Pods/FirebaseFirestore"
13 changes: 7 additions & 6 deletions firebase-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ kotlin {
// android("android")
// This is for iPhone emulator
// Switch here to iosArm64 (or iosArm32) to build library for iPhone device
iosX64("ios"){
binaries.getFramework("DEBUG")
.freeCompilerArgs.add("-tr")
iosX64("ios") {
compilations.main {
it.kotlinOptions.freeCompilerArgs += ["-tr"]
}
}
sourceSets {
commonMain {
Expand All @@ -46,8 +47,8 @@ kotlin {
implementation project(":firestore")
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
implementation "co.touchlab:stately:${versions.stately}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.0-RC"
implementation "co.touchlab:stately-common:${versions.stately}"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.4"
}
}
commonTest {
Expand All @@ -69,7 +70,7 @@ kotlin {
}*/
iosMain {
dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.0-RC"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.4"
}
}
iosTest {
Expand Down
38 changes: 19 additions & 19 deletions firebase-test/iosApp/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ PODS:
- BoringSSL-GRPC/Interface (= 0.0.3)
- BoringSSL-GRPC/Interface (0.0.3)
- firebase_test (0.2.0)
- FirebaseAuthInterop (1.0.0)
- FirebaseCore (6.0.2):
- FirebaseAuthInterop (1.1.0)
- FirebaseCore (6.0.4):
- GoogleUtilities/Environment (~> 6.0)
- GoogleUtilities/Logger (~> 6.0)
- FirebaseFirestore (1.3.2):
Expand All @@ -25,8 +25,8 @@ PODS:
- leveldb-library (~> 1.20)
- nanopb (~> 0.3.901)
- Protobuf (~> 3.1)
- GoogleUtilities/Environment (6.2.0)
- GoogleUtilities/Logger (6.2.0):
- GoogleUtilities/Environment (6.5.1)
- GoogleUtilities/Logger (6.5.1):
- GoogleUtilities/Environment
- "gRPC-C++ (0.0.9)":
- "gRPC-C++/Implementation (= 0.0.9)"
Expand All @@ -44,21 +44,21 @@ PODS:
- gRPC-Core/Interface (= 1.21.0)
- nanopb (~> 0.3)
- gRPC-Core/Interface (1.21.0)
- leveldb-library (1.20)
- nanopb (0.3.901):
- nanopb/decode (= 0.3.901)
- nanopb/encode (= 0.3.901)
- nanopb/decode (0.3.901)
- nanopb/encode (0.3.901)
- Protobuf (3.8.0)
- leveldb-library (1.22)
- nanopb (0.3.9011):
- nanopb/decode (= 0.3.9011)
- nanopb/encode (= 0.3.9011)
- nanopb/decode (0.3.9011)
- nanopb/encode (0.3.9011)
- Protobuf (3.11.4)

DEPENDENCIES:
- firebase_test (from `..`)
- FirebaseCore (~> 6.0.2)
- FirebaseFirestore (~> 1.3.2)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
trunk:
- BoringSSL-GRPC
- FirebaseAuthInterop
- FirebaseCore
Expand All @@ -77,16 +77,16 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318
firebase_test: f8da50830c6d9f009624a8de20fed39fb0bbec31
FirebaseAuthInterop: 0ffa57668be100582bb7643d4fcb7615496c41fc
FirebaseCore: b0f0262acebfa540e5f97b3832dbb13186980822
FirebaseAuthInterop: a0f37ae05833af156e72028f648d313f7e7592e9
FirebaseCore: 7ea99e200f0024262650be56623fbe6a7bef1707
FirebaseFirestore: d9c55dfd0cd648f420cc8340c4940dc3eab2d860
GoogleUtilities: 996e0db07153674fd1b54b220fda3a3dc3547cba
GoogleUtilities: 06eb53bb579efe7099152735900dd04bf09e7275
"gRPC-C++": 9dfe7b44821e7b3e44aacad2af29d2c21f7cde83
gRPC-Core: c9aef9a261a1247e881b18059b84d597293c9947
leveldb-library: 08cba283675b7ed2d99629a4bc5fd052cd2bb6a5
nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
Protobuf: 3f617b9a6e73605565086864c9bc26b2bf2dd5a3
leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7
nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd
Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7

PODFILE CHECKSUM: f49e7a806dd2d1115c527217708f78cbaa1b3851

COCOAPODS: 1.6.1
COCOAPODS: 1.9.0
25 changes: 5 additions & 20 deletions firebase-test/iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -222,28 +222,11 @@
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/BoringSSL-GRPC/openssl_grpc.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl_grpc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -448,6 +431,7 @@
CODE_SIGN_STYLE = Automatic;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = iosApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -469,6 +453,7 @@
CODE_SIGN_STYLE = Automatic;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = iosApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion firebase-test/iosApp/iosApp/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import firebase_test
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
SampleIosKt.kickOffTest()
ConfigTestFirestoreKt.configTestFirestore()
// label.text = Proxy().proxyHello()
}

Expand Down
4 changes: 2 additions & 2 deletions firebaseTestIos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ DEPENDENCIES:
- FirebaseFirestore (~> 1.3.2)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
https://github.com/CocoaPods/Specs.git:
- BoringSSL-GRPC
- FirebaseAuthInterop
- FirebaseCore
Expand Down Expand Up @@ -89,4 +89,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 6fd71b69807c8c057af8a2a1610b2a96cf6bf018

COCOAPODS: 1.6.1
COCOAPODS: 1.9.0
21 changes: 2 additions & 19 deletions firebaseTestIos/firebaseTestIos.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -229,28 +229,11 @@
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-firebaseTestIos/Pods-firebaseTestIos-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/BoringSSL-GRPC/openssl_grpc.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
"${BUILT_PRODUCTS_DIR}/leveldb-library/leveldb.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
"${PODS_ROOT}/Target Support Files/Pods-firebaseTestIos/Pods-firebaseTestIos-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl_grpc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Protobuf.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/leveldb.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
"${PODS_ROOT}/Target Support Files/Pods-firebaseTestIos/Pods-firebaseTestIos-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
6 changes: 3 additions & 3 deletions firebaseTestIos/firebaseTestIos/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Firestore.initialize()
SampleIosKt.kickOffTest()
//FirebaseApp.configure()
//Firestore.initialize()
ConfigTestFirestoreKt.configTestFirestore()
// Override point for customization after application launch.
return true
}
Expand Down
Loading