From 11a86f50d1fc30d36c368f27c00cda7afdc8f56d Mon Sep 17 00:00:00 2001 From: Denis Zhdanov Date: Wed, 13 Dec 2017 09:22:39 +0300 Subject: [PATCH] Applied Traute javac plugin in order to have null-checks for @NonNull method parameters in runtime TESTED: gradlew build & ensured that the checks are inserted --- app/build.gradle | 6 ++++++ build.gradle | 2 ++ subutil/build.gradle | 7 +++++++ utilcode/build.gradle | 7 +++++++ 4 files changed, 22 insertions(+) diff --git a/app/build.gradle b/app/build.gradle index 0e9a585acc..48f6c0fa5b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,6 @@ +plugins { + id "tech.harmonysoft.oss.traute" version '1.0.5' +} apply plugin: 'com.android.application' File signPropertiesFile = rootProject.file('sign/keystore.properties') @@ -46,6 +49,9 @@ android { } } +traute { + javacPluginVersion = trauteVersion +} dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') diff --git a/build.gradle b/build.gradle index 5a9b6d4c3d..1ebab42662 100644 --- a/build.gradle +++ b/build.gradle @@ -42,6 +42,8 @@ ext { junit_version = '4.12' robolectric_version = '3.1.2' + + trauteVersion = '1.0.10' } diff --git a/subutil/build.gradle b/subutil/build.gradle index 1334f30d7d..01c1e8aa42 100644 --- a/subutil/build.gradle +++ b/subutil/build.gradle @@ -1,3 +1,6 @@ +plugins { + id "tech.harmonysoft.oss.traute" version '1.0.5' +} apply plugin: 'com.android.library' apply plugin: 'jacoco' @@ -50,6 +53,10 @@ android { } } +traute { + javacPluginVersion = trauteVersion +} + dependencies { compileOnly "com.android.support:appcompat-v7:$support_version" compileOnly "com.android.support:design:$support_version" diff --git a/utilcode/build.gradle b/utilcode/build.gradle index 591a798cb3..1d417a429a 100644 --- a/utilcode/build.gradle +++ b/utilcode/build.gradle @@ -1,3 +1,6 @@ +plugins { + id "tech.harmonysoft.oss.traute" version '1.0.5' +} apply plugin: 'com.android.library' apply plugin: 'jacoco' @@ -49,6 +52,10 @@ android { } } +traute { + javacPluginVersion = trauteVersion +} + dependencies { compileOnly "com.android.support:appcompat-v7:$support_version" compileOnly "com.android.support:design:$support_version"