From 78eb6c35c2f2083b7368a63d9025428a8b95706e Mon Sep 17 00:00:00 2001 From: lijian Date: Thu, 14 Jun 2018 09:50:24 +0800 Subject: [PATCH] update gradle version --- app/build.gradle | 19 ++++++++++--------- .../downloader/MultiDownloadActivity.java | 4 +--- build.gradle | 4 +++- downloadlibrary/build.gradle | 14 +++++++------- gradle/wrapper/gradle-wrapper.properties | 12 ++++++------ 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 6704d6c..d03841c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 26 - buildToolsVersion "26.0.0" + compileSdkVersion 27 + buildToolsVersion "27.0.3" defaultConfig { applicationId "com.codyy.downloader" minSdkVersion 14 - targetSdkVersion 26 + targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -20,13 +20,14 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { +// compile fileTree(dir: 'libs', include: ['*.jar']) + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'com.android.support:appcompat-v7:26.+' - compile 'com.android.support:recyclerview-v7:26.+' - testCompile 'junit:junit:4.12' - compile project(':downloadlibrary') + implementation 'com.android.support:support-v4:27.1.1' + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:recyclerview-v7:27.1.1' + testImplementation 'junit:junit:4.12' + implementation project(':downloadlibrary') // compile 'com.github.CodyyAndroid:Downloader:0.0.1' } diff --git a/app/src/main/java/com/codyy/downloader/MultiDownloadActivity.java b/app/src/main/java/com/codyy/downloader/MultiDownloadActivity.java index fb0f1bf..63f969c 100644 --- a/app/src/main/java/com/codyy/downloader/MultiDownloadActivity.java +++ b/app/src/main/java/com/codyy/downloader/MultiDownloadActivity.java @@ -18,11 +18,9 @@ import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; -import android.widget.Toast; import com.codyy.download.Downloader; import com.codyy.download.entity.DownloadEntity; -import com.codyy.download.service.DownLoadListener; import com.codyy.download.service.DownloadRateListener; import com.codyy.download.service.DownloadStatus; import com.codyy.download.service.SimpleDownloadListener; @@ -70,7 +68,7 @@ public boolean onKey(View view, int i, KeyEvent keyEvent) { // mFileEntities.add(new FileEntity("resource", "http://reserver.9itest.com:8081/res/view/mobile/download/video/d908232052b84ef0bfa10152067339b8/396face834ca48dab37ad22c6323573b.do")); // mFileEntities.add(new FileEntity("resource", "http://reserver.jxd.9itest.com:8091/res/view/mobile/download/video/e74f91af5dd74767b8ad96753b5fb3ee/19632d7b5cfe458b9fcfaef7811f88bb.do")); mFileEntities.add(new FileEntity("resource", "http://reserver.jxd.9itest.com:8091/res/view/mobile/download/video/08ca41aeeb7b4e4c9801d0e8b1408890/27254357585042d9b4950332aa7a36a9.do")); - mFileEntities.add(new FileEntity("AndroidPDF", getString(R.string.url_small_file))); + mFileEntities.add(new FileEntity("TeamViewer_Setup", "http://mock.5idoo.com/file/TeamViewer_Setup.exe")); mFileEntities.add(new FileEntity("OSP","http://srv.codyy.cn/images/9059e96d-98e5-44dc-b509-a46d11716960.apk/app.apk")); recyclerView.setAdapter(new FileAdapter(mFileEntities)); mEditText.setText(Formatter.formatFileSize(getBaseContext(), getAvailableStore(getExternalStoragePath())) + "/" + Formatter.formatFileSize(getBaseContext(), getTotalStore(getExternalStoragePath()))); diff --git a/build.gradle b/build.gradle index 601e6a9..c1ab8a4 100644 --- a/build.gradle +++ b/build.gradle @@ -3,9 +3,10 @@ buildscript { repositories { jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:2.3.3' + classpath 'com.android.tools.build:gradle:3.1.3' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' // Add this line // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files @@ -14,6 +15,7 @@ buildscript { allprojects { repositories { + google() jcenter() maven { url 'https://jitpack.io' } } diff --git a/downloadlibrary/build.gradle b/downloadlibrary/build.gradle index cf2ef79..8d3a44c 100644 --- a/downloadlibrary/build.gradle +++ b/downloadlibrary/build.gradle @@ -3,12 +3,12 @@ apply plugin: 'com.github.dcendents.android-maven' group='com.github.codyyeachann' android { - compileSdkVersion 26 - buildToolsVersion "26.0.0" + compileSdkVersion 27 + buildToolsVersion "27.0.3" defaultConfig { minSdkVersion 14 - targetSdkVersion 26 + targetSdkVersion 27 versionCode 53 versionName "1.2.0" @@ -24,12 +24,12 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { +// compile fileTree(include: ['*.jar'], dir: 'libs') + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - testCompile 'junit:junit:4.12' - compile 'com.android.support:support-v4:26.0.0-alpha1' + testImplementation 'junit:junit:4.12' + implementation 'com.android.support:support-v4:27.1.1' } //--------------------------------------------- // 指定编码 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ff9f1d3..27a532a 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Fri Jun 16 13:50:40 CST 2017 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip +#Thu Jun 14 09:27:44 CST 2018 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip