Mergw with 13700_update

This commit is contained in:
vtretyakov
2020-03-18 11:29:52 +07:00
10 changed files with 98 additions and 84 deletions

View File

@@ -12,7 +12,7 @@ android-apps: pub-get apk-prod apk-ote apk-int apk-staging apk-testing apk-autob
archive: archive:
rm -fR output rm -fR output
mkdir -p output mkdir -p output
rsync build/app/outputs/apk/*/*/*.apk output rsync android/app/build/outputs/apk/*/*/*.apk output
apk-prod: apk-prod:
flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect || echo "prod" flutter build apk --split-per-abi --release --build-name $(VERSION_NAME) $(FLAGS) --build-number $(VERSION) --flavor dinect || echo "prod"

View File

@@ -1,8 +1,8 @@
def localProperties = new Properties() def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties') def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) { if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { stream -> localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(stream) localProperties.load(reader)
} }
} }
@@ -16,15 +16,15 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 27 compileSdkVersion 29
buildToolsVersion '27.0.3' buildToolsVersion '29.0.2'
lintOptions { lintOptions {
disable 'InvalidPackage' disable 'InvalidPackage'
} }
defaultConfig { defaultConfig {
targetSdkVersion 27 targetSdkVersion 29
minSdkVersion 16 minSdkVersion 16
applicationId "com.dinect.checker" applicationId "com.dinect.checker"
} }
@@ -48,6 +48,7 @@ android {
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
} }
release { release {
shrinkResources false
minifyEnabled false minifyEnabled false
signingConfig signingConfigs.release signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@@ -210,10 +211,10 @@ flutter {
dependencies { dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.1' implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.android.support:support-v4:27.1.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.android.support:support-media-compat:27.1.1' implementation 'androidx.media:media:1.1.0'
implementation 'com.squareup.okhttp3:okhttp:3.9.0' implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.squareup.okio:okio:1.13.0' implementation 'com.squareup.okio:okio:1.13.0'
implementation 'me.dm7.barcodescanner:zxing:1.9.8' implementation 'me.dm7.barcodescanner:zxing:1.9.8'

View File

@@ -10,8 +10,8 @@ import android.content.res.Resources;
import android.net.ConnectivityManager; import android.net.ConnectivityManager;
import android.net.NetworkInfo; import android.net.NetworkInfo;
import android.os.Bundle; import android.os.Bundle;
import android.support.v4.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.widget.Toast; import android.widget.Toast;
import java.util.ArrayList; import java.util.ArrayList;

View File

@@ -19,12 +19,12 @@ import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings; import android.provider.Settings;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v4.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.support.v7.app.ActionBar; import androidx.appcompat.app.ActionBar;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import android.util.Log; import android.util.Log;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@@ -155,11 +155,7 @@ public class ScannerActivity extends AppCompatActivity implements
private void initSwitchButton() { private void initSwitchButton() {
mButton = findViewById(R.id.cardPhoneButton); mButton = findViewById(R.id.cardPhoneButton);
mButton.setOnClickListener(this); mButton.setOnClickListener(this);
if ("autobonus".equals(BuildConfig.FLAVOR)) { resetSearchType(SearchType.PHONE_NUMBER, R.drawable.ic_phone, "enter_phone");
resetSearchType(SearchType.PHONE_NUMBER, R.drawable.ic_phone, "enter_phone");
} else {
resetSearchType(SearchType.CARD, R.drawable.ic_card, "enter_manual");
}
} }
private void resetSearchType(SearchType type, int iconId, String hintKey) { private void resetSearchType(SearchType type, int iconId, String hintKey) {

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" <androidx.appcompat.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -31,4 +31,4 @@
android:layout_marginTop="?attr/actionBarSize" android:layout_marginTop="?attr/actionBarSize"
android:background="@drawable/shadow_bottom" /> android:background="@drawable/shadow_bottom" />
</android.support.v7.widget.Toolbar> </androidx.appcompat.widget.Toolbar>

View File

@@ -1,12 +1,12 @@
buildscript { buildscript {
ext.kotlin_version = '1.2.40' ext.kotlin_version = '1.3.61'
repositories { repositories {
google() google()
jcenter() jcenter()
} }
dependencies { 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" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }
@@ -17,17 +17,3 @@ allprojects {
jcenter() 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'
}

View File

@@ -1 +1,4 @@
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx1536M
android.enableR8=false

View File

@@ -1,21 +1,20 @@
import 'dart:async'; import 'dart:async';
import 'package:checker/db.dart'; import 'package:checker/db.dart';
import 'package:checker/screens/splash.dart';
import 'package:checker/strings.dart'; import 'package:checker/strings.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:checker/screens/splash.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:sentry/sentry.dart'; import 'package:sentry/sentry.dart';
const platform = const MethodChannel('com.dinect.checker/instance_id'); const platform = const MethodChannel('com.dinect.checker/instance_id');
main() { main() {
WidgetsFlutterBinding.ensureInitialized();
platform.invokeMethod('getFlavor').then((flavor) { platform.invokeMethod('getFlavor').then((flavor) {
platform.invokeMethod('getAppTitle').then((title) { platform.invokeMethod('getAppTitle').then((title) {
String app = flavor; // dinect, autobonus
String app = flavor; // dinect, autobonus String appName = title; // Dinect, Dinect (INT), Autobonus
String appName= title; // Dinect, Dinect (INT), Autobonus
SqliteHelper helper = new SqliteHelper(); 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) { helper.getSettings(false).then((settings) {
if (settings.isEmpty) { if (settings.isEmpty) {
createSettingsTable(app, name, helper); createSettingsTable(app, name, helper);
@@ -54,7 +54,7 @@ createSettingsTable(String app, String name, SqliteHelper helper) {
start(String app, String name, String locale, SqliteHelper helper) { start(String app, String name, String locale, SqliteHelper helper) {
final SentryClient sentry = new SentryClient( final SentryClient sentry = new SentryClient(
dsn: 'https://42166056b75d4fe49455555a9bc576a0@sentry.io/1376057'); dsn: 'https://42166056b75d4fe49455555a9bc576a0@sentry.io/1376057');
FlutterError.onError = (FlutterErrorDetails details) { FlutterError.onError = (FlutterErrorDetails details) {
FlutterError.dumpErrorToConsole(details); FlutterError.dumpErrorToConsole(details);
@@ -74,7 +74,6 @@ start(String app, String name, String locale, SqliteHelper helper) {
} }
class Checker extends StatefulWidget { class Checker extends StatefulWidget {
final SqliteHelper helper; final SqliteHelper helper;
final String app; final String app;
final String appName; final String appName;
@@ -82,14 +81,11 @@ class Checker extends StatefulWidget {
Checker(this.app, this.appName, this.helper); Checker(this.app, this.appName, this.helper);
@override @override
State<StatefulWidget> createState() => new CheckerState( State<StatefulWidget> createState() =>
this.app, new CheckerState(this.app, this.appName, this.helper);
this.appName,
this.helper);
} }
class CheckerState extends State<Checker> { class CheckerState extends State<Checker> {
SqliteHelper helper; SqliteHelper helper;
String app; String app;
String appName; String appName;
@@ -98,9 +94,6 @@ class CheckerState extends State<Checker> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new MaterialApp( return new MaterialApp(title: appName, home: new SplashScreen(helper, app));
title: appName,
home: new SplashScreen(helper, app)
);
} }
} }

View File

@@ -7,14 +7,14 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.0.8" version: "2.4.0"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
name: charcode name: charcode
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.2" version: "1.1.3"
collection: collection:
dependency: transitive dependency: transitive
description: description:
@@ -22,18 +22,32 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.14.11" version: "1.14.11"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" 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: http:
dependency: "direct main" dependency: "direct main"
description: description:
name: http name: http
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.0" version: "0.12.0+4"
http_parser: http_parser:
dependency: transitive dependency: transitive
description: description:
@@ -47,49 +61,63 @@ packages:
name: image_picker name: image_picker
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.10" version: "0.6.3+4"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:
name: intl name: intl
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.15.7" version: "0.16.1"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.7" version: "1.1.8"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.6.2" version: "1.6.4"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
name: path_provider name: path_provider
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted 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: petitparser:
dependency: transitive dependency: transitive
description: description:
name: petitparser name: petitparser
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted 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: sentry:
dependency: "direct main" dependency: "direct main"
description: description:
name: sentry name: sentry
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.2.0" version: "3.0.1"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter
@@ -101,21 +129,21 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.4.1" version: "1.6.0"
sprintf: sprintf:
dependency: "direct main" dependency: "direct main"
description: description:
name: sprintf name: sprintf
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "4.0.0" version: "4.0.2"
sqflite: sqflite:
dependency: "direct main" dependency: "direct main"
description: description:
name: sqflite name: sqflite
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.2+1" version: "1.2.1"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
@@ -129,14 +157,21 @@ packages:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.4" version: "1.0.5"
synchronized: synchronized:
dependency: transitive dependency: transitive
description: description:
name: synchronized name: synchronized
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted 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: typed_data:
dependency: transitive dependency: transitive
description: description:
@@ -164,7 +199,7 @@ packages:
name: xml name: xml
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.2.3" version: "3.6.0"
sdks: sdks:
dart: ">=2.2.2 <3.0.0" dart: ">=2.6.0 <3.0.0"
flutter: ">=0.1.4 <2.0.0" flutter: ">=1.12.13 <2.0.0"

View File

@@ -2,14 +2,14 @@ name: checker
description: A new Flutter project. description: A new Flutter project.
dependencies: dependencies:
http: '>=0.11.3+12' http: '0.12.0+4'
sprintf: "4.0.0" sprintf: "4.0.2"
path_provider: "0.4.1" path_provider: "1.6.1"
sqflite: "0.12.2+1" sqflite: "1.2.1"
image_picker: '^0.4.1' # use for ask permissions @ iOS image_picker: '0.6.3+4' # use for ask permissions @ iOS
xml: "^3.0.0" xml: "3.6.0"
sentry: 2.2.0 sentry: 3.0.1
intl: 0.15.7 intl: 0.16.1
flutter: flutter:
sdk: flutter sdk: flutter