diff --git a/android/.idea/vcs.xml b/android/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/android/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index a0e4026..1e29b65 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,14 +2,14 @@ group 'io.intheloup.beacons' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.2.41' + ext.kotlin_version = '1.3.21' repositories { google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.2' + classpath 'com.android.tools.build:gradle:3.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,14 +25,14 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - compileSdkVersion 27 + compileSdkVersion 28 sourceSets { main.java.srcDirs += 'src/main/kotlin' } defaultConfig { minSdkVersion 16 - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions { disable 'InvalidPackage' @@ -46,13 +46,14 @@ kotlin { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.22.5" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:0.27.0-eap13" - implementation "com.android.support:support-compat:27.1.1" - implementation "com.android.support:support-core-utils:27.1.1" + implementation 'androidx.core:core:1.0.0-beta01' + implementation 'androidx.legacy:legacy-support-core-utils:1.0.0-beta01' implementation "org.altbeacon:android-beacon-library:2.14" implementation "com.squareup.moshi:moshi:1.5.0" provided rootProject.findProject(":streams_channel") } + diff --git a/android/gradle.properties b/android/gradle.properties index 8bd86f6..53ae0ae 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1 +1,3 @@ +android.enableJetifier=true +android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..13cc8b9 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Apr 11 18:27:33 KST 2019 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip diff --git a/android/src/main/kotlin/io/intheloup/beacons/channel/Channels.kt b/android/src/main/kotlin/io/intheloup/beacons/channel/Channels.kt index 1bc648a..01c89f4 100644 --- a/android/src/main/kotlin/io/intheloup/beacons/channel/Channels.kt +++ b/android/src/main/kotlin/io/intheloup/beacons/channel/Channels.kt @@ -14,8 +14,8 @@ import io.intheloup.beacons.logic.BeaconsClient import io.intheloup.beacons.logic.PermissionClient import io.intheloup.beacons.logic.SharedMonitor import io.intheloup.streamschannel.StreamsChannel -import kotlinx.coroutines.experimental.android.UI -import kotlinx.coroutines.experimental.launch +import kotlinx.coroutines.android.UI +import kotlinx.coroutines.launch class Channels(private val permissionClient: PermissionClient, private val beaconsClient: BeaconsClient) : MethodChannel.MethodCallHandler { diff --git a/android/src/main/kotlin/io/intheloup/beacons/logic/BeaconsClient.kt b/android/src/main/kotlin/io/intheloup/beacons/logic/BeaconsClient.kt index c4734df..862588d 100644 --- a/android/src/main/kotlin/io/intheloup/beacons/logic/BeaconsClient.kt +++ b/android/src/main/kotlin/io/intheloup/beacons/logic/BeaconsClient.kt @@ -13,8 +13,8 @@ import android.util.Log import io.intheloup.beacons.BeaconsPlugin import io.intheloup.beacons.channel.DataRequest import io.intheloup.beacons.data.* -import kotlinx.coroutines.experimental.android.UI -import kotlinx.coroutines.experimental.launch +import kotlinx.coroutines.android.UI +import kotlinx.coroutines.launch import org.altbeacon.beacon.* import org.altbeacon.beacon.logging.LogManager import org.altbeacon.beacon.logging.Loggers diff --git a/android/src/main/kotlin/io/intheloup/beacons/logic/PermissionClient.kt b/android/src/main/kotlin/io/intheloup/beacons/logic/PermissionClient.kt index 19ea7a6..448c497 100644 --- a/android/src/main/kotlin/io/intheloup/beacons/logic/PermissionClient.kt +++ b/android/src/main/kotlin/io/intheloup/beacons/logic/PermissionClient.kt @@ -6,16 +6,15 @@ package io.intheloup.beacons.logic import android.Manifest import android.app.Activity import android.content.pm.PackageManager -import android.support.v4.app.ActivityCompat -import android.support.v4.content.ContextCompat +import androidx.core.app.ActivityCompat +import androidx.core.content.ContextCompat import io.flutter.plugin.common.PluginRegistry import io.intheloup.beacons.BeaconsPlugin import io.intheloup.beacons.data.Permission import io.intheloup.beacons.data.Result -import kotlinx.coroutines.experimental.android.UI -import kotlinx.coroutines.experimental.launch import java.util.* -import kotlin.coroutines.experimental.suspendCoroutine +import kotlin.coroutines.resume +import kotlin.coroutines.suspendCoroutine class PermissionClient {