fix example and migrate to androidx
This commit is contained in:
parent
1536372360
commit
9a3ad8d03f
|
@ -1,19 +1,18 @@
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply from: "../config.gradle"
|
|
||||||
apply from: "../flutter.gradle"
|
apply from: "../flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion versions.targetSDK
|
compileSdkVersion 29
|
||||||
buildToolsVersion "${versions.buildTools}"
|
buildToolsVersion "29.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion versions.minSDK
|
minSdkVersion 24
|
||||||
targetSdkVersion versions.targetSDK
|
targetSdkVersion 29
|
||||||
applicationId "$appInfo.applicationID"
|
applicationId "app.yakka.fluroexample"
|
||||||
versionCode appInfo.build
|
versionCode 1
|
||||||
versionName "${appInfo.version}"
|
versionName "1.6.0"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
disable 'InvalidPackage'
|
disable 'InvalidPackage'
|
||||||
|
@ -30,13 +29,13 @@ android {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
// kotlin
|
// kotlin
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${versions.kotlin}"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.61"
|
||||||
// google
|
// google
|
||||||
implementation "com.android.support:appcompat-v7:${versions.googleSupport}"
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
implementation "com.android.support:support-v13:${versions.googleSupport}"
|
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
|
||||||
implementation "com.android.support:support-v4:${versions.googleSupport}"
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
// testing
|
// testing
|
||||||
androidTestImplementation "com.android.support:support-annotations:${versions.googleSupport}"
|
androidTestImplementation 'androidx.annotation:annotation:1.1.0'
|
||||||
androidTestImplementation 'com.android.support.test:runner:1.0.1'
|
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||||
androidTestImplementation 'com.android.support.test:rules:1.0.1'
|
androidTestImplementation 'androidx.test:rules:1.2.0'
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ import io.flutter.plugins.GeneratedPluginRegistrant
|
||||||
|
|
||||||
class MainActivity : FlutterActivity() {
|
class MainActivity : FlutterActivity() {
|
||||||
|
|
||||||
private val LOG_TAG = "A:Main"
|
private val logTag = "A:Main"
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -17,16 +17,13 @@ class MainActivity : FlutterActivity() {
|
||||||
checkForLinkEvent(intent)
|
checkForLinkEvent(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkForLinkEvent(intent: Intent) {
|
private fun checkForLinkEvent(intent: Intent) {
|
||||||
if (intent.action == Intent.ACTION_VIEW && intent.data != null) {
|
val data = intent.data
|
||||||
val path = intent.data.getQueryParameter("path")
|
if (intent.action == Intent.ACTION_VIEW && data != null) {
|
||||||
val text = intent.data.getQueryParameter("message") ?: "Why you don't enter text?"
|
val path = data.getQueryParameter("path")
|
||||||
|
val text = data.getQueryParameter("message") ?: "Why you don't enter text?"
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
Log.d(LOG_TAG, "Setting initial route to: $path?message=$text")
|
Log.d(logTag, "Setting initial route to: $path?message=$text")
|
||||||
flutterView.setInitialRoute("$path?message=$text")
|
flutterView.setInitialRoute("$path?message=$text")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.2.30'
|
ext.kotlin_version = '1.3.61'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
classpath 'com.android.tools.build:gradle:3.5.3'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
ext.appInfo = [
|
ext.appInfo = [
|
||||||
version: '1.3.0',
|
version: '1.6.0',
|
||||||
build: 1,
|
build: 1,
|
||||||
applicationID: "com.goposse.fluro"
|
applicationID: "com.goposse.fluro"
|
||||||
]
|
]
|
||||||
|
|
||||||
ext.versions = [
|
ext.versions = [
|
||||||
minSDK: 21,
|
minSDK: 21,
|
||||||
targetSDK: 27,
|
targetSDK: 29,
|
||||||
buildTools: '27.0.3',
|
buildTools: '29.0.3',
|
||||||
kotlin: '1.2.30',
|
kotlin: '1.3.61',
|
||||||
googleSupport: '27.1.0'
|
googleSupport: '27.1.0'
|
||||||
]
|
]
|
|
@ -1 +1,4 @@
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
|
android.enableR8=true
|
||||||
|
android.useAndroidX=true
|
||||||
|
android.enableJetifier=true
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# This is a generated file; do not edit or check into version control.
|
||||||
|
export "FLUTTER_ROOT=/home/luke/Development/.sdks/flutter"
|
||||||
|
export "FLUTTER_APPLICATION_PATH=/home/luke/Development/yakka/fluro/fluro-flutter/example"
|
||||||
|
export "FLUTTER_TARGET=lib/main.dart"
|
||||||
|
export "FLUTTER_BUILD_DIR=build"
|
||||||
|
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
|
||||||
|
export "FLUTTER_FRAMEWORK_DIR=/home/luke/Development/.sdks/flutter/bin/cache/artifacts/engine/ios"
|
||||||
|
export "FLUTTER_BUILD_NAME=1.0.0"
|
||||||
|
export "FLUTTER_BUILD_NUMBER=1"
|
|
@ -7,8 +7,11 @@
|
||||||
|
|
||||||
#import <Flutter/Flutter.h>
|
#import <Flutter/Flutter.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface GeneratedPluginRegistrant : NSObject
|
@interface GeneratedPluginRegistrant : NSObject
|
||||||
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
|
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
||||||
#endif /* GeneratedPluginRegistrant_h */
|
#endif /* GeneratedPluginRegistrant_h */
|
||||||
|
|
|
@ -8,7 +8,7 @@ homepage: https://github.com/theyakka/fluro
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.1.0 <3.0.0"
|
sdk: ">=2.1.0 <3.0.0"
|
||||||
flutter: ">=1.2.0"
|
flutter: ">=1.5.0 <1.13.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
|
Loading…
Reference in New Issue