Upgrade to Gradle 4.1 and Android Gradle Tools 3.0.1

Required dropping gradle-witness because it does not support modern Gradle.
This commit is contained in:
str4d
2017-11-24 14:35:07 +00:00
parent da763a7c81
commit 6aac99e7ea
8 changed files with 43 additions and 72 deletions

View File

@ -1,9 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'witness'
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION as String)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION as String
defaultConfig {
versionCode 4745238
versionName "$I2P_VERSION"
@ -38,14 +36,18 @@ android {
packagingOptions {
exclude 'LICENSE.txt'
}
flavorDimensions 'tier'
productFlavors {
free {
dimension 'tier'
applicationId 'net.i2p.android'
}
donate {
dimension 'tier'
applicationId 'net.i2p.android.donate'
}
legacy {
dimension 'tier'
applicationId 'net.i2p.android.router'
}
}
@ -53,50 +55,33 @@ android {
dependencies {
// Local dependencies
compile project(':lib:client')
compile project(':lib:helper')
compile project(':routerjars')
implementation project(':lib:client')
implementation project(':lib:helper')
implementation project(path: ':routerjars', configuration: 'routerjars')
// Android Support Repository dependencies
def supportVersion = '25.3.1'
compile "com.android.support:support-v4:$supportVersion"
compile "com.android.support:appcompat-v7:$supportVersion"
compile "com.android.support:preference-v7:$supportVersion"
compile "com.android.support:preference-v14:$supportVersion"
compile "com.android.support:recyclerview-v7:$supportVersion"
implementation "com.android.support:support-v4:$supportVersion"
implementation "com.android.support:appcompat-v7:$supportVersion"
implementation "com.android.support:preference-v7:$supportVersion"
implementation "com.android.support:preference-v14:$supportVersion"
implementation "com.android.support:recyclerview-v7:$supportVersion"
// Remote dependencies
compile 'com.androidplot:androidplot-core:1.4.1'
compile 'com.eowise:recyclerview-stickyheaders:0.5.2@aar'
compile 'com.inkapplications.viewpageindicator:library:2.4.4'
compile 'com.pnikosis:materialish-progress:1.7'
compile "net.i2p:router:$I2P_VERSION"
compile 'net.i2p.android.ext:floatingactionbutton:1.10.1'
compile 'org.sufficientlysecure:html-textview:3.1'
implementation 'com.androidplot:androidplot-core:1.4.1'
implementation 'com.eowise:recyclerview-stickyheaders:0.5.2@aar'
implementation 'com.inkapplications.viewpageindicator:library:2.4.4'
implementation 'com.pnikosis:materialish-progress:1.7'
implementation "net.i2p:router:$I2P_VERSION"
implementation 'net.i2p.android.ext:floatingactionbutton:1.10.1'
implementation 'org.sufficientlysecure:html-textview:3.1'
// Testing-only dependencies
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2') {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
}
dependencyVerification {
verify = [
'com.android.support:support-v4:07d389154bcf73b47e514964df1578136b26cba78257b8a577a3ccb54beff0ae',
'com.android.support:appcompat-v7:ac1ebbc46589195dda3e0b1becfe410bafd75bdf3edd1cd9acf04850f3895830',
'com.android.support:preference-v7:b37d8193c65cf8eb3c4ba9cbfc6d5c96042177901622717fb089290bef784a58',
'com.android.support:preference-v14:970904d676ea886d0be459e7e5e36c0db650daefea5bbe80cc59146091905be5',
'com.android.support:recyclerview-v7:375974a8724e359d97d77fa8522c614f813a3ac4583c1807f154a3f9a054b0a1',
'com.androidplot:androidplot-core:7670da5838ce2ae2b0b5faabeb9d6a1f2787d30d3fe9f0952adc5611910d18c0',
'com.eowise:recyclerview-stickyheaders:7b236da49b33b840e9ba6e7e4182218d1a2d9047236fdbc3ca947352f9b0883b',
'com.inkapplications.viewpageindicator:library:77b26a7723cd10fa5e29480be239e8d68f431f4bc20d9144169c9ce06ebac2bf',
'com.pnikosis:materialish-progress:da089a90d1dab61e9b50038c09081019398f81190d12b0b567ce94b83ef8cf93',
'net.i2p:router:b088e269ba8ee707e714b2ebaf78a5b81bbd1df0deb3be3b3a42e80bb110804d',
'net.i2p.android.ext:floatingactionbutton:09d43e2d4ac04a91bf7a37e1ec48a8d220204e3a55dca72cd36cd9fa27461ade',
'org.sufficientlysecure:html-textview:ed740adf05cae2373999c7a3047c803183d9807b2cf66162902090d7c112a832',
]
}
project.ext.i2pbase = '../i2p.i2p'
def Properties props = new Properties()
def propFile = new File(project(':routerjars').projectDir, 'local.properties')

View File

@ -1,10 +1,10 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath files('gradle/libs/gradle-witness.jar')
classpath 'com.android.tools.build:gradle:3.0.1'
}
}

View File

@ -13,5 +13,4 @@ POM_DEVELOPER_EMAIL=str4d@i2pmail.org
I2P_VERSION=0.9.31
ANDROID_BUILD_TARGET_SDK_VERSION=25
ANDROID_BUILD_TOOLS_VERSION=25.0.2
ANDROID_BUILD_SDK_VERSION=25

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Sun Nov 06 10:33:19 CST 2016
#Sat Nov 25 01:31:50 NZDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

View File

@ -1,11 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'witness'
version = "$I2P_VERSION"
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION as String)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion 9
@ -27,19 +25,11 @@ android {
}
dependencies {
compile "net.i2p:i2p:$I2P_VERSION"
compile "net.i2p.client:streaming:$I2P_VERSION"
implementation "net.i2p:i2p:$I2P_VERSION"
implementation "net.i2p.client:streaming:$I2P_VERSION"
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
}
dependencyVerification {
verify = [
'net.i2p:i2p:e766537af2494d2489e0476f51847aa249e27f914a52261ae83fa7f0f8d34c98',
'net.i2p.client:mstreaming:a516bb06100e2c21d36d5e85f203d479cfb19e50e248af062fe7468871810d20',
'net.i2p.client:streaming:77871bf8ea5acda55abf012429b80e89af2689b69a07b3b7dcf6ca6668dad377',
]
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.9.5'
}
apply from: "${project.rootDir}/gradle/maven-push.gradle"

View File

@ -1,11 +1,9 @@
apply plugin: 'com.android.library'
apply plugin: 'witness'
version = '0.9.4'
android {
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION as String)
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION as String
defaultConfig {
minSdkVersion 9
@ -27,16 +25,10 @@ android {
}
dependencies {
compile 'com.android.support:support-v4:25.3.1'
implementation 'com.android.support:support-v4:25.3.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.9.5'
}
dependencyVerification {
verify = [
'com.android.support:support-v4:07d389154bcf73b47e514964df1578136b26cba78257b8a577a3ccb54beff0ae',
]
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:1.9.5'
}
apply from: "${project.rootDir}/gradle/maven-push.gradle"

View File

@ -1,23 +1,28 @@
apply plugin: 'java'
configurations {
routerjars
}
task buildRouter(type: Exec) {
outputs.dir('libs')
commandLine 'ant', 'buildrouter'
}
// TODO an empty routerjars.jar is added to the classpath
// An empty routerjars.jar is added to the classpath for the "default" configuration.
// But we are using the "routerjars" configuration, which only contains what we want.
artifacts {
'default' file: file('libs/newsxml.jar'), builtBy: buildRouter
'default' file: file('libs/i2ptunnel.jar'), builtBy: buildRouter
'default' file: file('libs/i2ptunnel-ui.jar'), builtBy: buildRouter
'default' file: file('libs/addressbook.jar'), builtBy: buildRouter
'default' file: file('libs/BOB.jar'), builtBy: buildRouter
routerjars file: file('libs/newsxml.jar'), builtBy: buildRouter
routerjars file: file('libs/i2ptunnel.jar'), builtBy: buildRouter
routerjars file: file('libs/i2ptunnel-ui.jar'), builtBy: buildRouter
routerjars file: file('libs/addressbook.jar'), builtBy: buildRouter
routerjars file: file('libs/BOB.jar'), builtBy: buildRouter
}
clean.dependsOn cleanBuildRouter
clean << {
clean.doLast {
exec {
commandLine 'ant', 'clean'
}