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:
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"

View File

@@ -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'

View File

@@ -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;

View File

@@ -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) {

View File

@@ -1,5 +1,5 @@
<?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"
android:id="@+id/toolbar"
android:layout_width="match_parent"
@@ -31,4 +31,4 @@
android:layout_marginTop="?attr/actionBarSize"
android:background="@drawable/shadow_bottom" />
</android.support.v7.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>

View File

@@ -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'
}

View File

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

View File

@@ -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<StatefulWidget> createState() => new CheckerState(
this.app,
this.appName,
this.helper);
State<StatefulWidget> createState() =>
new CheckerState(this.app, this.appName, this.helper);
}
class CheckerState extends State<Checker> {
SqliteHelper helper;
String app;
String appName;
@@ -98,9 +94,6 @@ class CheckerState extends State<Checker> {
@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));
}
}

View File

@@ -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"

View File

@@ -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