diff options
Diffstat (limited to 'build.gradle')
| -rw-r--r-- | build.gradle | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..dffeaea --- /dev/null +++ b/build.gradle @@ -0,0 +1,68 @@ +apply plugin: 'groovy' + +dependencies { + compile gradleApi() + compile localGroovy() +} + +apply plugin: 'maven' + +group = 'org.thejk' +version = '0.1-SNAPSHOT' + +uploadArchives { + repositories { + mavenDeployer { + repository(url: uri('../repo')) + } + } +} + +class PackageTask extends DefaultTask { + @Input + String packageName + + @InputFile + File getLispScript() { + return project.file('flycheck-android-experimental.el') + } + + @InputFile + File getPackageScript() { + return project.file('flycheck-android-experimental-pkg.el') + } + + @InputFile + File getJavaPythonScript() { + return project.file('bin/flycheck-android-java.py') + } + + @OutputFile + File getOutput() { + return new File(project.buildDir, "${packageName}.tar") + } + + @TaskAction + def action() { + def intermediate = new File(project.buildDir, 'package/intermediate') + def target = new File(intermediate, packageName) + def bin = new File(target, 'bin') + bin.mkdirs() + project.copy { + from(lispScript, packageScript) + into target + } + project.copy { + from(javaPythonScript) + into bin + } + project.exec { + commandLine 'tar', '-c', '-f', output, '-C', intermediate, packageName + } + } +} + +task packageLisp(type: PackageTask) { + packageName 'flycheck-android-experimental-0.1' +} + |
