diff --git a/Makefile b/Makefile
index 2384ebe..af286b8 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ android-apps: pub-get apk-prod apk-ote apk-int apk-staging apk-testing apk-autob
archive:
rm -fR output
mkdir -p output
- rsync build/app/outputs/apk/*/*/*.apk output
+ rsync android/app/build/outputs/apk/*/*/*.apk output
apk-prod:
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect || echo "prod"
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 228a055..0fd2978 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,8 +1,8 @@
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
- localPropertiesFile.withInputStream { stream ->
- localProperties.load(stream)
+ localPropertiesFile.withReader('UTF-8') { reader ->
+ localProperties.load(reader)
}
}
@@ -16,15 +16,15 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 27
- buildToolsVersion '27.0.3'
+ compileSdkVersion 29
+ buildToolsVersion '29.0.2'
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
- targetSdkVersion 27
+ targetSdkVersion 29
minSdkVersion 16
applicationId "com.dinect.checker"
}
@@ -48,6 +48,7 @@ android {
signingConfig signingConfigs.debug
}
release {
+ shrinkResources false
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@@ -210,10 +211,10 @@ flutter {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.android.support:appcompat-v7:27.1.1'
- implementation 'com.android.support:recyclerview-v7:27.1.1'
- implementation 'com.android.support:support-v4:27.1.1'
- implementation 'com.android.support:support-media-compat:27.1.1'
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.recyclerview:recyclerview:1.1.0'
+ implementation 'androidx.legacy:legacy-support-v4:1.0.0'
+ implementation 'androidx.media:media:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.squareup.okio:okio:1.13.0'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
diff --git a/android/app/src/main/java/com/dinect/checker/MainActivity.java b/android/app/src/main/java/com/dinect/checker/MainActivity.java
index be9a587..2681e25 100644
--- a/android/app/src/main/java/com/dinect/checker/MainActivity.java
+++ b/android/app/src/main/java/com/dinect/checker/MainActivity.java
@@ -10,8 +10,8 @@ import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Bundle;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
import android.widget.Toast;
import java.util.ArrayList;
diff --git a/android/app/src/main/java/com/dinect/checker/ScannerActivity.java b/android/app/src/main/java/com/dinect/checker/ScannerActivity.java
index fe784b1..5529e21 100644
--- a/android/app/src/main/java/com/dinect/checker/ScannerActivity.java
+++ b/android/app/src/main/java/com/dinect/checker/ScannerActivity.java
@@ -19,12 +19,12 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.provider.Settings;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.app.ActionBar;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.Toolbar;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.core.content.ContextCompat;
+import androidx.appcompat.app.ActionBar;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
@@ -155,11 +155,7 @@ public class ScannerActivity extends AppCompatActivity implements
private void initSwitchButton() {
mButton = findViewById(R.id.cardPhoneButton);
mButton.setOnClickListener(this);
- if ("autobonus".equals(BuildConfig.FLAVOR)) {
- resetSearchType(SearchType.PHONE_NUMBER, R.drawable.ic_phone, "enter_phone");
- } else {
- resetSearchType(SearchType.CARD, R.drawable.ic_card, "enter_manual");
- }
+ resetSearchType(SearchType.PHONE_NUMBER, R.drawable.ic_phone, "enter_phone");
}
private void resetSearchType(SearchType type, int iconId, String hintKey) {
diff --git a/android/app/src/main/res/layout/v_custom_toolbar.xml b/android/app/src/main/res/layout/v_custom_toolbar.xml
index 9a6c187..ae5065a 100644
--- a/android/app/src/main/res/layout/v_custom_toolbar.xml
+++ b/android/app/src/main/res/layout/v_custom_toolbar.xml
@@ -1,5 +1,5 @@
-
-
+
diff --git a/android/build.gradle b/android/build.gradle
index a2b6e7a..31bd497 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,12 +1,12 @@
buildscript {
- ext.kotlin_version = '1.2.40'
+ ext.kotlin_version = '1.3.61'
repositories {
google()
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.1.1'
+ classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
@@ -17,17 +17,3 @@ allprojects {
jcenter()
}
}
-
-rootProject.buildDir = '../build'
-subprojects {
- project.buildDir = "${rootProject.buildDir}/${project.name}"
- project.evaluationDependsOn(':app')
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
-
-task wrapper(type: Wrapper) {
- gradleVersion = '2.14.1'
-}
diff --git a/android/gradle.properties b/android/gradle.properties
index 8bd86f6..b0bc401 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1 +1,4 @@
+android.enableJetifier=true
+android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
+android.enableR8=false
diff --git a/lib/main.dart b/lib/main.dart
index ffc5c81..50ca567 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,21 +1,20 @@
import 'dart:async';
import 'package:checker/db.dart';
+import 'package:checker/screens/splash.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
-import 'package:checker/screens/splash.dart';
import 'package:flutter/services.dart';
import 'package:sentry/sentry.dart';
const platform = const MethodChannel('com.dinect.checker/instance_id');
main() {
-
+ WidgetsFlutterBinding.ensureInitialized();
platform.invokeMethod('getFlavor').then((flavor) {
platform.invokeMethod('getAppTitle').then((title) {
-
- String app = flavor; // dinect, autobonus
- String appName= title; // Dinect, Dinect (INT), Autobonus
+ String app = flavor; // dinect, autobonus
+ String appName = title; // Dinect, Dinect (INT), Autobonus
SqliteHelper helper = new SqliteHelper();
@@ -32,7 +31,8 @@ main() {
});
}
-initWithSystemValue(String app, String name, String locale, SqliteHelper helper) {
+initWithSystemValue(
+ String app, String name, String locale, SqliteHelper helper) {
helper.getSettings(false).then((settings) {
if (settings.isEmpty) {
createSettingsTable(app, name, helper);
@@ -54,7 +54,7 @@ createSettingsTable(String app, String name, SqliteHelper helper) {
start(String app, String name, String locale, SqliteHelper helper) {
final SentryClient sentry = new SentryClient(
- dsn: 'https://42166056b75d4fe49455555a9bc576a0@sentry.io/1376057');
+ dsn: 'https://42166056b75d4fe49455555a9bc576a0@sentry.io/1376057');
FlutterError.onError = (FlutterErrorDetails details) {
FlutterError.dumpErrorToConsole(details);
@@ -74,7 +74,6 @@ start(String app, String name, String locale, SqliteHelper helper) {
}
class Checker extends StatefulWidget {
-
final SqliteHelper helper;
final String app;
final String appName;
@@ -82,14 +81,11 @@ class Checker extends StatefulWidget {
Checker(this.app, this.appName, this.helper);
@override
- State createState() => new CheckerState(
- this.app,
- this.appName,
- this.helper);
+ State createState() =>
+ new CheckerState(this.app, this.appName, this.helper);
}
class CheckerState extends State {
-
SqliteHelper helper;
String app;
String appName;
@@ -98,9 +94,6 @@ class CheckerState extends State {
@override
Widget build(BuildContext context) {
- return new MaterialApp(
- title: appName,
- home: new SplashScreen(helper, app)
- );
+ return new MaterialApp(title: appName, home: new SplashScreen(helper, app));
}
}
diff --git a/pubspec.lock b/pubspec.lock
index fd4a58b..96f8061 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -7,14 +7,14 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.8"
+ version: "2.4.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.2"
+ version: "1.1.3"
collection:
dependency: transitive
description:
@@ -22,18 +22,32 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.14.11"
+ convert:
+ dependency: transitive
+ description:
+ name: convert
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.1.1"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
+ flutter_plugin_android_lifecycle:
+ dependency: transitive
+ description:
+ name: flutter_plugin_android_lifecycle
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.0.6"
http:
dependency: "direct main"
description:
name: http
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.0"
+ version: "0.12.0+4"
http_parser:
dependency: transitive
description:
@@ -47,49 +61,63 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
- version: "0.4.10"
+ version: "0.6.3+4"
intl:
dependency: "direct main"
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
- version: "0.15.7"
+ version: "0.16.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
- version: "1.1.7"
+ version: "1.1.8"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
- version: "1.6.2"
+ version: "1.6.4"
path_provider:
dependency: "direct main"
description:
name: path_provider
url: "https://pub.dartlang.org"
source: hosted
- version: "0.4.1"
+ version: "1.6.1"
+ pedantic:
+ dependency: transitive
+ description:
+ name: pedantic
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.9.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
- version: "2.0.2"
+ version: "2.4.0"
+ platform:
+ dependency: transitive
+ description:
+ name: platform
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "2.2.1"
sentry:
dependency: "direct main"
description:
name: sentry
url: "https://pub.dartlang.org"
source: hosted
- version: "2.2.0"
+ version: "3.0.1"
sky_engine:
dependency: transitive
description: flutter
@@ -101,21 +129,21 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
- version: "1.4.1"
+ version: "1.6.0"
sprintf:
dependency: "direct main"
description:
name: sprintf
url: "https://pub.dartlang.org"
source: hosted
- version: "4.0.0"
+ version: "4.0.2"
sqflite:
dependency: "direct main"
description:
name: sqflite
url: "https://pub.dartlang.org"
source: hosted
- version: "0.12.2+1"
+ version: "1.2.1"
stack_trace:
dependency: transitive
description:
@@ -129,14 +157,21 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
- version: "1.0.4"
+ version: "1.0.5"
synchronized:
dependency: transitive
description:
name: synchronized
url: "https://pub.dartlang.org"
source: hosted
- version: "1.5.3"
+ version: "2.2.0"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ url: "https://pub.dartlang.org"
+ source: hosted
+ version: "1.1.0"
typed_data:
dependency: transitive
description:
@@ -164,7 +199,7 @@ packages:
name: xml
url: "https://pub.dartlang.org"
source: hosted
- version: "3.2.3"
+ version: "3.6.0"
sdks:
- dart: ">=2.2.2 <3.0.0"
- flutter: ">=0.1.4 <2.0.0"
+ dart: ">=2.6.0 <3.0.0"
+ flutter: ">=1.12.13 <2.0.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index ecb8afa..ed0f4ba 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -2,14 +2,14 @@ name: checker
description: A new Flutter project.
dependencies:
- http: '>=0.11.3+12'
- sprintf: "4.0.0"
- path_provider: "0.4.1"
- sqflite: "0.12.2+1"
- image_picker: '^0.4.1' # use for ask permissions @ iOS
- xml: "^3.0.0"
- sentry: 2.2.0
- intl: 0.15.7
+ http: '0.12.0+4'
+ sprintf: "4.0.2"
+ path_provider: "1.6.1"
+ sqflite: "1.2.1"
+ image_picker: '0.6.3+4' # use for ask permissions @ iOS
+ xml: "3.6.0"
+ sentry: 3.0.1
+ intl: 0.16.1
flutter:
sdk: flutter