aboutsummaryrefslogtreecommitdiff
path: root/src/main/groovy/frege/gradle/FregeBasePlugin.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/groovy/frege/gradle/FregeBasePlugin.groovy')
-rw-r--r--src/main/groovy/frege/gradle/FregeBasePlugin.groovy17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/groovy/frege/gradle/FregeBasePlugin.groovy b/src/main/groovy/frege/gradle/FregeBasePlugin.groovy
new file mode 100644
index 0000000..5af7a86
--- /dev/null
+++ b/src/main/groovy/frege/gradle/FregeBasePlugin.groovy
@@ -0,0 +1,17 @@
+package frege.gradle
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaBasePlugin
+
+class FregeBasePlugin implements Plugin<Project> {
+ static String EXTENSION_NAME = "frege"
+
+ @Override
+ void apply(Project project) {
+ // Workaround to build proper jars on Windows, see https://github.com/Frege/frege-gradle-plugin/issues/9
+ System.setProperty("file.encoding", "UTF-8")
+ project.getPluginManager().apply(JavaBasePlugin.class);
+ project.extensions.create(EXTENSION_NAME, FregePluginExtension)
+ }
+}