From f91bcb26a8d7d9a3febfdef8b13ad2b8dba38909 Mon Sep 17 00:00:00 2001 From: PeratX <1215714524@qq.com> Date: Fri, 8 Sep 2017 18:10:35 +0800 Subject: [PATCH] Update build env to api 26 --- app/build.gradle | 17 +++++++++-------- .../java/org/itxtech/daedalus/Daedalus.java | 2 +- .../daedalus/fragment/RulesFragment.java | 3 +-- .../itxtech/daedalus/util/Configurations.java | 4 ++++ build.gradle | 3 +++ 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3c01216..7af48a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,12 +4,12 @@ apply plugin: 'com.google.gms.google-services' def gitCommit = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim() android { - compileSdkVersion 25 - buildToolsVersion "25.0.3" + compileSdkVersion 26 + buildToolsVersion "26.0.1" defaultConfig { applicationId "org.itxtech.daedalus" minSdkVersion 15 - targetSdkVersion 25 + targetSdkVersion 26 versionCode 12 versionName "1.10.1" @@ -42,17 +42,18 @@ android { dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') - compile 'com.android.support:appcompat-v7:25.3.1' - compile 'com.android.support:design:25.3.1' - compile 'com.android.support:support-v4:25.3.1' - compile 'com.android.support:percent:25.3.1' - compile 'com.android.support:cardview-v7:25.3.1' + compile 'com.android.support:appcompat-v7:26.0.2' + compile 'com.android.support:design:26.0.2' + compile 'com.android.support:support-v4:26.0.2' + compile 'com.android.support:percent:26.0.2' + compile 'com.android.support:cardview-v7:26.0.2' compile 'org.pcap4j:pcap4j-core:1.7.1' compile 'org.pcap4j:pcap4j-packetfactory-static:1.7.1' compile 'de.measite.minidns:minidns-core:0.2.2' compile 'com.google.code.gson:gson:2.8.1' + compile 'com.google.firebase:firebase-core:11.0.4' compile 'com.google.firebase:firebase-crash:11.0.4' testCompile 'junit:junit:4.12' diff --git a/app/src/main/java/org/itxtech/daedalus/Daedalus.java b/app/src/main/java/org/itxtech/daedalus/Daedalus.java index f5703cc..6a9ea19 100644 --- a/app/src/main/java/org/itxtech/daedalus/Daedalus.java +++ b/app/src/main/java/org/itxtech/daedalus/Daedalus.java @@ -114,7 +114,7 @@ public class Daedalus extends Application { initData(); } - private void initDirectory(String dir){ + private void initDirectory(String dir) { File directory = new File(dir); if (!directory.isDirectory()) { Logger.warning(dir + " is not a directory. Delete result: " + String.valueOf(directory.delete())); diff --git a/app/src/main/java/org/itxtech/daedalus/fragment/RulesFragment.java b/app/src/main/java/org/itxtech/daedalus/fragment/RulesFragment.java index 6f3c991..72078db 100644 --- a/app/src/main/java/org/itxtech/daedalus/fragment/RulesFragment.java +++ b/app/src/main/java/org/itxtech/daedalus/fragment/RulesFragment.java @@ -125,8 +125,7 @@ public class RulesFragment extends ToolbarFragment implements Toolbar.OnMenuItem if (id == R.id.action_reload) { if (!Daedalus.getPrefs().getBoolean("settings_allow_dynamic_rule_reload", false)) { - Snackbar.make(getView(), R.string.notice_check_dynamic_rule_reload, Snackbar.LENGTH_SHORT) - .setAction("Action", null).show(); + Snackbar.make(getView(), R.string.notice_check_dynamic_rule_reload, Snackbar.LENGTH_SHORT).show(); } else { Daedalus.setRulesChanged(); } diff --git a/app/src/main/java/org/itxtech/daedalus/util/Configurations.java b/app/src/main/java/org/itxtech/daedalus/util/Configurations.java index 6f4c156..25cd8b6 100644 --- a/app/src/main/java/org/itxtech/daedalus/util/Configurations.java +++ b/app/src/main/java/org/itxtech/daedalus/util/Configurations.java @@ -136,6 +136,10 @@ public class Configurations { return config; } + public Configurations() { + //TODO: Initial config. Eg. Build-in rules + } + public void save() { try { if (file != null) { diff --git a/build.gradle b/build.gradle index faf1d38..0cf1e4a 100644 --- a/build.gradle +++ b/build.gradle @@ -16,6 +16,9 @@ buildscript { allprojects { repositories { jcenter() + maven { + url 'https://maven.google.com' + } } }