Skip to content

Commit

Permalink
make log colored & update gradle version
Browse files Browse the repository at this point in the history
  • Loading branch information
SmartDengg committed Apr 2, 2019
1 parent de8892c commit c423ee5
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 19 deletions.
1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'

// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
dependencies {
implementation localGroovy()
implementation gradleApi()
implementation "com.android.tools.build:gradle:3.2.1"
implementation "com.android.tools.build:gradle:3.3.2"
}

sourceSets {
Expand Down
6 changes: 1 addition & 5 deletions click-debounce-gradle-plugin/gradle-plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ repositories {
google()
}

ext {
androidPluginVersion = '3.2.1'
}

dependencies {
compile gradleApi()
compile localGroovy()
implementation "com.android.tools.build:gradle:$androidPluginVersion"
implementation "com.android.tools.build:gradle:3.3.2"
implementation 'commons-io:commons-io:2.6'
implementation 'org.ow2.asm:asm:7.0'
implementation 'org.ow2.asm:asm-commons:6.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class DebounceIncrementalTransform extends Transform {
this.debounceExt = project."${DebounceExtension.NAME}"
this.weavedVariantClassesMap = weavedVariantClassesMap
this.isApp = isApp
this.debounceOutDir = new File(Joiner.on(File.separatorChar).join(
project.buildDir,
this.debounceOutDir = new File(Joiner.on(File.separatorChar).join(project.buildDir,
FD_OUTPUTS,
'debounce',
'logs'))
Expand Down Expand Up @@ -165,7 +164,8 @@ class DebounceIncrementalTransform extends Transform {
}
} finally {
PrintWriterUtil.closePrintWriter(changedFiles, writer)
println "Printing files status to [" + PrintWriterUtil.fileName(changedFiles) + "]"
ColoredLogger.logYellow(
"SUCCESS: Printing files status to [" + PrintWriterUtil.fileName(changedFiles) + "]")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class OutputMappingTask extends DefaultTask {
} else {
state = 'FIRST RUN'
}
println "OUT OF DATE: ${change.file.name}:$state"
ColoredLogger.log("OUT OF DATE: ${change.file.name}:$state")
}
}

inputs.removed { change ->
if (change.file.directory) return
if (loggable && Utils.isMatchCondition(change.file.name)) {
println "REMOVED: ${change.file.name}"
ColoredLogger.log("REMOVED: ${change.file.name}")
}
}

Expand All @@ -69,13 +69,14 @@ class OutputMappingTask extends DefaultTask {
}.each { weavedClass ->
writer.println "${weavedClass.className}:"
weavedClass.debouncedMethods.each { method ->
if (loggable) println "ADD $weavedClass.className : $method"
if (loggable) ColoredLogger.log("ADD $weavedClass.className : $method")
writer.println "\t -> $method"
}
}
} finally {
PrintWriterUtil.closePrintWriter(mappingFile, writer)
println "Success wrote TXT mapping report to [" + PrintWriterUtil.fileName(mappingFile) + "]"
ColoredLogger.logYellow(
"SUCCESS: Writing TXT mapping report to [" + PrintWriterUtil.fileName(mappingFile) + "]")
}
}
}
4 changes: 1 addition & 3 deletions click-debounce-lib-android/lib-android.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
apply plugin: 'com.android.library'
apply plugin: 'smartdengg.clickdebounce'

debounce {
loggable = true
}
debounce.loggable = true

android {
compileSdkVersion 26
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Mar 09 12:06:31 CST 2018
#Tue Apr 02 13:44:20 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

0 comments on commit c423ee5

Please sign in to comment.