org.groovymc.modsdotgroovy.gradle.tasks.ModsDotGroovyToJson.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin Show documentation
Show all versions of gradle-plugin Show documentation
A Gradle plugin for creation of mods metadata file from a groovy file
The newest version!
package org.groovymc.modsdotgroovy.gradle.tasks
import com.google.gson.GsonBuilder
import groovy.transform.CompileStatic
import org.gradle.api.tasks.CacheableTask
@CacheableTask
@CompileStatic
abstract class ModsDotGroovyToJson extends AbstractMDGConvertTask {
@Override
protected String writeData(Map data) {
final gson = new GsonBuilder()
.setPrettyPrinting()
.disableHtmlEscaping()
.create()
return gson.toJson(data)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy