Skip to content

Instantly share code, notes, and snippets.

@bluepapa32
Created February 2, 2011 14:38
Show Gist options
  • Save bluepapa32/807762 to your computer and use it in GitHub Desktop.
Save bluepapa32/807762 to your computer and use it in GitHub Desktop.
com.bluepapa32.gradle.plugins.Native2AsciiPlugin
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