Created
February 2, 2011 14:38
-
-
Save bluepapa32/807762 to your computer and use it in GitHub Desktop.
com.bluepapa32.gradle.plugins.Native2AsciiPlugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bluepapa32.gradle.plugins | |
import org.apache.tools.ant.filters.EscapeUnicode | |
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.gradle.api.plugins.JavaBasePlugin | |
public class Native2AsciiPlugin implements Plugin<Project> { | |
def void apply(Project project) { | |
project.getPlugins().apply(JavaBasePlugin.class); | |
project.sourceSets.each { s -> | |
project.tasks.getByName(s.processResourcesTaskName) { task -> | |
task.from(s.resources.srcDirs) { | |
include '**/*.properties' | |
filter(EscapeUnicode) | |
} | |
task.from(s.resources.srcDirs) { | |
exclude '**/*.properties' | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment