From 846b54d413d5cb17b8f98cd4c8459b423e94c4f4 Mon Sep 17 00:00:00 2001 From: Riyaz Ahamed Date: Tue, 25 Sep 2018 21:33:39 +0530 Subject: [PATCH 1/3] 1. Update support library to 28.0.0 2. Update gradle scripts 3. Update DataBinding library to v2 --- build.gradle | 2 +- buildSrc/src/main/java/gradle/Config.java | 10 +++++----- gradle.properties | 5 ++++- gradle/wrapper/gradle-wrapper.properties | 2 +- multi-view-adapter-databinding/build.gradle | 4 ++-- sample/build.gradle | 10 +++++----- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 036cc71..f5316c8 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.0' + classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.novoda:bintray-release:0.7.0' } } diff --git a/buildSrc/src/main/java/gradle/Config.java b/buildSrc/src/main/java/gradle/Config.java index 6512355..93cee14 100644 --- a/buildSrc/src/main/java/gradle/Config.java +++ b/buildSrc/src/main/java/gradle/Config.java @@ -18,14 +18,14 @@ public class Config { - public static final int MIN_SDK = 9; - public static final int COMPILE_SDK = 25; + public static final int MIN_SDK = 14; + public static final int COMPILE_SDK = 28; public static final int TARGET_SDK = COMPILE_SDK; - public static final String VERSION_NAME = "1.2.6"; - public static final int VERSION_CODE = 126; + public static final String VERSION_NAME = "1.3.0"; + public static final int VERSION_CODE = 130; - private static final String SUPPORT_LIB_VERSION = "25.4.0"; + private static final String SUPPORT_LIB_VERSION = "28.0.0"; private static final String SUPPORT = "com.android.support:"; public static final String APP_COMPAT = SUPPORT + "appcompat-v7:" + SUPPORT_LIB_VERSION; diff --git a/gradle.properties b/gradle.properties index 209316a..68bc174 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,4 +15,7 @@ org.gradle.jvmargs=-Xmx1536m # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects - org.gradle.parallel=true \ No newline at end of file +org.gradle.parallel=true + + +android.databinding.enableV2=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bf1b63c..b6517bb 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip diff --git a/multi-view-adapter-databinding/build.gradle b/multi-view-adapter-databinding/build.gradle index d517cd4..6079cd0 100644 --- a/multi-view-adapter-databinding/build.gradle +++ b/multi-view-adapter-databinding/build.gradle @@ -42,10 +42,10 @@ dependencies { implementation project(':multi-view-adapter') implementation Config.RECYCLER_VIEW - compileOnly('com.android.databinding:library:1.3.1') { + compileOnly('com.android.databinding:library:3.2.0') { transitive = false } - compileOnly('com.android.databinding:baseLibrary:2.3.2') { + compileOnly('com.android.databinding:baseLibrary:3.2.0') { transitive = false } } diff --git a/sample/build.gradle b/sample/build.gradle index 6874461..81546a9 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -43,15 +43,15 @@ android { } dependencies { - compile project(':multi-view-adapter') - compile project(':multi-view-adapter-databinding') + implementation project(':multi-view-adapter') + implementation project(':multi-view-adapter-databinding') implementation Config.APP_COMPAT implementation Config.RECYCLER_VIEW implementation Config.CARD_VIEW implementation Config.DESIGN - compile 'com.android.support.constraint:constraint-layout:1.0.2' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' - debugCompile "com.github.brianPlummer:tinydancer:0.1.0" - releaseCompile "com.github.brianPlummer:tinydancer-noop:0.1.0" + debugImplementation "com.github.brianPlummer:tinydancer:0.1.0" + releaseImplementation "com.github.brianPlummer:tinydancer-noop:0.1.0" } \ No newline at end of file From 4619308899ee894072d9c5b003be790d6cf389bc Mon Sep 17 00:00:00 2001 From: Riyaz Ahamed Date: Tue, 25 Sep 2018 23:23:58 +0530 Subject: [PATCH 2/3] Update JaCoCo plugin and task scripts --- build.gradle | 1 + multi-view-adapter/build.gradle | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index f5316c8..9283079 100644 --- a/build.gradle +++ b/build.gradle @@ -6,6 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.novoda:bintray-release:0.7.0' + classpath 'org.jacoco:org.jacoco.core:0.8.1' } } diff --git a/multi-view-adapter/build.gradle b/multi-view-adapter/build.gradle index fe0be3f..454daac 100644 --- a/multi-view-adapter/build.gradle +++ b/multi-view-adapter/build.gradle @@ -21,7 +21,11 @@ apply plugin: 'com.novoda.bintray-release' apply plugin: 'jacoco' jacoco { - toolVersion = "0.7.4.201502262128" + toolVersion = "0.8.1" +} + +tasks.withType(Test) { + jacoco.includeNoLocationClasses = true } task jacocoTestReport(type: JacocoReport, @@ -65,10 +69,8 @@ android { } testOptions { - unitTests.all { - jacoco { - includeNoLocationClasses = true - } + unitTests { + includeAndroidResources = true } } } From 30c4c9eaccc91e06438c3e0459126fa4b852eacc Mon Sep 17 00:00:00 2001 From: Riyaz Ahamed Date: Wed, 26 Sep 2018 11:11:48 +0530 Subject: [PATCH 3/3] Update readme to point latest release --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index efcd9a0..cad9711 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,14 @@ Helper library for recyclerviews to create composable view holders without boile The Gradle dependency is available via [JCenter](https://bintray.com/devahamed/MultiViewAdapter/multi-view-adapter/view). JCenter is the default maven repository used by Android Studio. -The minimum API level supported by this library is API 9. +The minimum API level supported by this library is API 14. ```gradle dependencies { - compile 'com.github.devahamed:multi-view-adapter:1.2.3' + compile 'com.github.devahamed:multi-view-adapter:1.3.0' // If you want to use data binding - compile 'com.github.devahamed:multi-view-adapter-databinding:1.2.3' + compile 'com.github.devahamed:multi-view-adapter-databinding:1.3.0' } ```