Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migration to android X #33

Open
wants to merge 7 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
6 changes: 6 additions & 0 deletions android/.idea/vcs.xml

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

17 changes: 9 additions & 8 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand All @@ -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'
Expand All @@ -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")
}

2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
Binary file added android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down