All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.groovymc.modsdotgroovy.gradle.tasks.ModsDotGroovyToJson.groovy Maven / Gradle / Ivy

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