Skip to content

Instantly share code, notes, and snippets.

@orekyuu
Created September 26, 2015 03:54
Show Gist options
  • Save orekyuu/4d2d8de75c0551ea2cb0 to your computer and use it in GitHub Desktop.
Save orekyuu/4d2d8de75c0551ea2cb0 to your computer and use it in GitHub Desktop.
Groovyでプラグインを書くためのbuild.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'groovy'
sourceCompatibility = 1.8
targetCompatibility = 1.8
[compileJava, compileTestJava].each {
it.options.encoding = 'UTF-8'
}
configurations { providedCompile }
sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
sourceSets.test.runtimeClasspath += configurations.providedCompile
jar {
baseName = 'GroovyDemoPlugin'
version = '1.0.0'
manifest {
attributes 'Plugin-ID': 'net.orekyuu.demo.groovy'
attributes 'Plugin-Name': 'GroovyDemoPlugin'
attributes 'Author': 'orekyuu'
attributes 'Author-Web': ''
attributes 'Plugin-Version': '1.0.0'
attributes 'Min-API-Version': '1.0.1'
attributes 'Plugin-Class': 'net.orekyuu.demo.groovy.GroovyDemo'
}
from {
configurations.compile.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
repositories {
mavenCentral()
maven {
url = 'http://repos.orekyuu.net/'
}
}
dependencies {
providedCompile 'net.orekyuu:JavaBeamStudioAPI:1.0.1'
compile 'org.codehaus.groovy:groovy-all:2.3.6'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment