gradle crash
parent
ee598f59d8
commit
4196636df1
|
|
@ -50,6 +50,7 @@ android {
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
|
multiDexEnabled true
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,9 +67,21 @@ android {
|
||||||
buildConfigField ("String[]", "SUPPORTED_DEVICES", collectSupportedDevicesToArray())
|
buildConfigField ("String[]", "SUPPORTED_DEVICES", collectSupportedDevicesToArray())
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
minifyEnabled false
|
||||||
|
shrinkResources false
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
//coreLibraryDesugaringEnabled true
|
||||||
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = JavaVersion.VERSION_1_8.toString()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
flutter {
|
flutter {
|
||||||
|
|
@ -76,6 +89,7 @@ flutter {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
//coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.0.9'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||||
|
|
@ -132,3 +146,5 @@ def collectSupportedDevicesToArray() {
|
||||||
"\"${it}\""
|
"\"${it}\""
|
||||||
}.join(",") + '}'
|
}.join(",") + '}'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,12 @@ public class BankNfcPlugins implements MethodCallHandler {
|
||||||
case "shutdown":
|
case "shutdown":
|
||||||
shutdown(call, result);
|
shutdown(call, result);
|
||||||
break;
|
break;
|
||||||
|
case "version":
|
||||||
|
|
||||||
|
result.success("version: "+Runtime.class.getPackage().getSpecificationVersion());
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case "get":
|
case "get":
|
||||||
final List<Object> json = new ArrayList<>();
|
final List<Object> json = new ArrayList<>();
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
|
|
@ -86,6 +92,16 @@ public class BankNfcPlugins implements MethodCallHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static int getVersion() {
|
||||||
|
String version = System.getProperty("java.version");
|
||||||
|
if(version.startsWith("1.")) {
|
||||||
|
version = version.substring(2, 3);
|
||||||
|
} else {
|
||||||
|
int dot = version.indexOf(".");
|
||||||
|
if(dot != -1) { version = version.substring(0, dot); }
|
||||||
|
} return Integer.parseInt(version);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void init(MethodCall call, Result result) {
|
private void init(MethodCall call, Result result) {
|
||||||
String serverUrl = call.argument("serverUrl");
|
String serverUrl = call.argument("serverUrl");
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,12 @@ allprojects {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
configurations.all {
|
||||||
|
resolutionStrategy {
|
||||||
|
cacheDynamicVersionsFor 2, 'minutes'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.buildDir = '../build'
|
rootProject.buildDir = '../build'
|
||||||
|
|
@ -143,3 +149,10 @@ subprojects {
|
||||||
task clean(type: Delete) {
|
task clean(type: Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,16 @@ class _BankViewState extends State<BankView> {
|
||||||
String payValue;
|
String payValue;
|
||||||
String cancelValue;
|
String cancelValue;
|
||||||
String shutdownValue;
|
String shutdownValue;
|
||||||
|
String versionValue;
|
||||||
bool loading = false;
|
bool loading = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
load();
|
//load();
|
||||||
}
|
}
|
||||||
|
|
||||||
load() async {
|
initialize() async {
|
||||||
String result = await _channel.invokeMethod('init', <String, dynamic>{
|
String result = await _channel.invokeMethod('init', <String, dynamic>{
|
||||||
'serverUrl': 'http://185.98.84.231:2000',
|
'serverUrl': 'http://185.98.84.231:2000',
|
||||||
});
|
});
|
||||||
|
|
@ -36,6 +37,13 @@ class _BankViewState extends State<BankView> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version() async {
|
||||||
|
String result = await _channel.invokeMethod('version');
|
||||||
|
setState(() {
|
||||||
|
versionValue = result ?? 'none';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
connect() async {
|
connect() async {
|
||||||
String result = await _channel.invokeMethod("connection");
|
String result = await _channel.invokeMethod("connection");
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -111,7 +119,22 @@ class _BankViewState extends State<BankView> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RaisedButton(
|
RaisedButton(
|
||||||
child: Text('Activity m4Bank'), onPressed: activity),
|
child: Text('Activity m4Bank'), onPressed: activity),
|
||||||
Text('init: $initValue'),
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: <Widget>[
|
||||||
|
Text('version: $versionValue'),
|
||||||
|
RaisedButton(
|
||||||
|
child: Text('Version'), onPressed: version),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
|
children: <Widget>[
|
||||||
|
Text('init: $initValue'),
|
||||||
|
RaisedButton(
|
||||||
|
child: Text('Init'), onPressed: initialize),
|
||||||
|
],
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue