Skip to content

Commit

Permalink
Pretty json
Browse files Browse the repository at this point in the history
  • Loading branch information
waynell committed Dec 18, 2016
1 parent 285a95d commit 71be6f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
4 changes: 2 additions & 2 deletions bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ apply plugin: 'com.jfrog.bintray'

def siteUrl = 'https://github.com/waynell' // 项目的主页
def gitUrl = 'https://github.com/waynell' // Git仓库的url
group = "com.waynell.tintpng" // Maven Group ID for the artifact,一般填你唯一的包名
version = "1.1.5"
group = "com.waynell.tinypng" // Maven Group ID for the artifact,一般填你唯一的包名
version = "1.0.0"

install {
repositories.mavenInstaller {
Expand Down
15 changes: 1 addition & 14 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

buildscript {
repositories {
mavenCentral()
Expand All @@ -18,22 +17,10 @@ allprojects {
}

apply plugin: 'groovy'
apply plugin: 'maven'
apply from: 'bintray.gradle'

dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.tinify:tinify:1.3.1'
}

group='com.waynell.tinypng'
version='1.0.0'

uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('repo'))
}
}
}

4 changes: 3 additions & 1 deletion src/main/groovy/com/waynell/tinypng/TinyPngTask.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ public class TinyPngTask extends DefaultTask {

if(newCompressedList) {
compressedList.addAll(newCompressedList)
compressedListFile.write(new JsonOutput().toJson(compressedList), "utf-8")
def jsonOutput = new JsonOutput()
def json = jsonOutput.toJson(compressedList)
compressedListFile.write(jsonOutput.prettyPrint(json), "utf-8")
}

}
Expand Down

0 comments on commit 71be6f8

Please sign in to comment.