Skip to content

Commit

Permalink
[fix #10, #11] update android plugin to 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fashare2015 committed Nov 21, 2017
1 parent bd5a091 commit 4f72dd7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ buildscript {

repositories {
jcenter()
maven { url 'https://maven.google.com/' }
}
dependencies {
classpath _android.plugin
Expand All @@ -22,6 +23,7 @@ buildscript {
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com/' }
}
}

Expand Down
15 changes: 12 additions & 3 deletions ext.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ println("${project.name}: apply ext")
project.ext{
println("${project.name}: init ext")

def androidPluginVersion = "2.2.0"
def androidPluginVersion = "3.0.0"
_android = [
plugin: "com.android.tools.build:gradle:$androidPluginVersion",

compileSdkVersion : 24,
buildToolsVersion : '24.0.1',
buildToolsVersion : '27.0.1',

minSdkVersion : 15,
targetSdkVersion : 24,
Expand Down Expand Up @@ -41,7 +41,16 @@ project.ext{
springview = "com.liaoinstan.springview:library:1.3.0"
swipebackhelper = "com.jude:swipebackhelper:3.1.2"

databindingCompiler = "com.android.databinding:compiler:$androidPluginVersion"
// def databindingCompilerVersion = androidPluginVersion
/**
* 理论上,databinding compiler 应该与 android plugin 版本保持一致。
* 然而,它升级到 3.0 会导致 databinding 的 <include/> 标签传值出错(子类无法传给父类)。
* 不确定是不是 databinding compiler 3.0 的 bug, 暂时先不升级。
*
* see https://stackoverflow.com/questions/44769078/android-databinding-3-0-0-alpha4-not-working-for-include-tags
*/
def databindingCompilerVersion = "2.3.3"
databindingCompiler = "com.android.databinding:compiler:$databindingCompilerVersion"

// rx
def rxjavaVersion = "2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ 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

0 comments on commit 4f72dd7

Please sign in to comment.