diff options
-rw-r--r-- | build.gradle | 40 | ||||
-rw-r--r-- | buildSrc/build.gradle | 14 | ||||
-rw-r--r-- | buildSrc/lib/frege-3.21.232-g7b05453.jar (renamed from lib/frege-3.21.232-g7b05453.jar) | bin | 10720001 -> 10720001 bytes | |||
-rw-r--r-- | buildSrc/src/main/groovy/org/gradle/frege/FregePlugin.groovy | 13 | ||||
-rw-r--r-- | buildSrc/src/main/groovy/org/gradle/frege/FregeTask.groovy | 31 |
5 files changed, 65 insertions, 33 deletions
diff --git a/build.gradle b/build.gradle index cefc288..011a41f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,36 +1,10 @@ -apply plugin: FregePlugin -apply plugin: "idea" -apply plugin: "java" - -class FregePlugin implements Plugin<Project> { - void apply(Project project) { - // Add the 'greeting' extension object - project.extensions.create("frege", FregePluginExtension) - // Add a task that uses the configuration - project.task('hello') << { - - - "java -cp " - "frege.compiler.Main" - - - - } - } -} - -class FregePluginExtension { - -} - -repositories { - - flatDir name:"frege-lib", dirs:"lib" +import org.gradle.frege.FregePlugin +buildscript { + repositories { + flatDir name:"frege-lib", dirs:"buildSrc/lib" + } } -dependencies { - - compile ":frege:3.21.232-g7b05453" - -}
\ No newline at end of file +apply plugin: FregePlugin +apply plugin: "idea"
\ No newline at end of file diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle new file mode 100644 index 0000000..1b520fb --- /dev/null +++ b/buildSrc/build.gradle @@ -0,0 +1,14 @@ +apply plugin: "groovy" + +repositories { + + flatDir name:"frege-lib", dirs:"lib" + +} + +dependencies { + + compile ":frege:3.21.232-g7b05453" + compile gradleApi() + +}
\ No newline at end of file diff --git a/lib/frege-3.21.232-g7b05453.jar b/buildSrc/lib/frege-3.21.232-g7b05453.jar Binary files differindex 254d961..254d961 100644 --- a/lib/frege-3.21.232-g7b05453.jar +++ b/buildSrc/lib/frege-3.21.232-g7b05453.jar diff --git a/buildSrc/src/main/groovy/org/gradle/frege/FregePlugin.groovy b/buildSrc/src/main/groovy/org/gradle/frege/FregePlugin.groovy new file mode 100644 index 0000000..93c5f26 --- /dev/null +++ b/buildSrc/src/main/groovy/org/gradle/frege/FregePlugin.groovy @@ -0,0 +1,13 @@ +package org.gradle.frege + +import org.gradle.api.Plugin +import org.gradle.api.Project + +class FregePlugin implements Plugin<Project> { + + void apply(Project project) { + project.apply(plugin: 'base') + project.task('compileFrege', type: FregeTask, group: 'Build') + } + +} diff --git a/buildSrc/src/main/groovy/org/gradle/frege/FregeTask.groovy b/buildSrc/src/main/groovy/org/gradle/frege/FregeTask.groovy new file mode 100644 index 0000000..cdd089a --- /dev/null +++ b/buildSrc/src/main/groovy/org/gradle/frege/FregeTask.groovy @@ -0,0 +1,31 @@ +package org.gradle.frege + +import org.gradle.api.DefaultTask +import org.gradle.api.GradleException +import org.gradle.api.InvalidUserDataException +import org.gradle.api.tasks.* + +class FregeTask extends DefaultTask { + + @Input boolean hints + + @Input boolean verbose + + @Input boolean inline = true + + @Input boolean make = true + + @Input boolean skipCompile + + @Input boolean includeStale + + @TaskAction + void executeCompile() { + println "Compiling Frege" + + + + + } + +}
\ No newline at end of file |