aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Gagnaux <tgagnaux@gmail.com>2021-06-28 11:10:10 +0200
committerThibault Gagnaux <tgagnaux@gmail.com>2021-06-28 11:10:10 +0200
commitf3d085304bad105e65ce0c77f25ae59161fd8776 (patch)
tree92988ca069de5c6cdce67a18971d9ccfb3b0ef85
parent3be7e4219a15c0939f929c7c0836273f78e3a4f5 (diff)
downloadfrege-gradle-plugin-f3d085304bad105e65ce0c77f25ae59161fd8776.tar.gz
frege-gradle-plugin-f3d085304bad105e65ce0c77f25ae59161fd8776.tar.bz2
frege-gradle-plugin-f3d085304bad105e65ce0c77f25ae59161fd8776.zip
Inits branch with a simple groovy test
-rw-r--r--.gitignore26
-rw-r--r--.travis.yml13
-rw-r--r--LICENSE28
-rw-r--r--README.adoc70
-rw-r--r--build.gradle89
-rwxr-xr-xdeploy.sh11
-rw-r--r--docs/img/FileTypes.pngbin110654 -> 0 bytes
-rw-r--r--docs/img/Frege_Gradle_Tasks.pngbin32919 -> 0 bytes
-rw-r--r--docs/img/external_tool_frepl.pngbin617820 -> 0 bytes
-rw-r--r--docs/img/external_tool_run.pngbin180110 -> 0 bytes
-rw-r--r--docs/img/external_tool_test.pngbin195869 -> 0 bytes
-rw-r--r--docs/img/watcher_fregeCompile.pngbin219827 -> 0 bytes
-rw-r--r--gradle.properties8
-rw-r--r--gradle/integTest.gradle48
-rw-r--r--gradle/sonatype.gradle98
-rw-r--r--gradle/wrapper/gradle-wrapper.jarbin58910 -> 59203 bytes
-rw-r--r--gradle/wrapper/gradle-wrapper.properties5
-rwxr-xr-xgradlew2
-rw-r--r--[-rwxr-xr-x]gradlew.bat21
-rw-r--r--lib/frege-3.25.84.jarbin8478454 -> 0 bytes
-rw-r--r--src/integTest/groovy/frege/gradle/integtest/fixtures/AbstractFregeIntegrationSpec.groovy67
-rw-r--r--src/integTest/groovy/frege/gradle/plugins/FregePluginIntegTest.groovy208
-rw-r--r--src/integTest/groovy/frege/gradle/tasks/FregeCompileIntegTest.groovy106
-rw-r--r--src/main/groovy/frege/gradle/DefaultFregeSourceSet.java31
-rw-r--r--src/main/groovy/frege/gradle/FregeSourceDirectorySet.groovy26
-rw-r--r--src/main/groovy/frege/gradle/FregeSourceSet.java8
-rw-r--r--src/main/groovy/frege/gradle/FregeSourceSetDirectoryFactory.groovy30
-rw-r--r--src/main/groovy/frege/gradle/FregeSourceSetOutputs.groovy7
-rw-r--r--src/main/groovy/frege/gradle/plugins/FregeBasePlugin.java87
-rw-r--r--src/main/groovy/frege/gradle/plugins/FregePlugin.groovy44
-rw-r--r--src/main/groovy/frege/gradle/plugins/FregePluginExtension.groovy11
-rw-r--r--src/main/groovy/frege/gradle/tasks/FregeCompile.groovy214
-rw-r--r--src/main/groovy/frege/gradle/tasks/FregeDoc.groovy86
-rw-r--r--src/main/groovy/frege/gradle/tasks/FregeNativeGen.groovy61
-rw-r--r--src/main/groovy/frege/gradle/tasks/FregeQuickCheck.groovy93
-rw-r--r--src/main/groovy/frege/gradle/tasks/FregeRepl.groovy40
-rw-r--r--src/main/resources/META-INF/gradle-plugins/org.frege-lang.base.properties1
-rw-r--r--src/main/resources/META-INF/gradle-plugins/org.frege-lang.properties1
-rw-r--r--src/test/groovy/ch.fhnw.thga.fregeplugin/FregePluginFunctionalTest.groovy18
-rw-r--r--src/test/groovy/frege/gradle/plugins/FregeBasePluginTest.groovy30
-rw-r--r--src/test/groovy/frege/gradle/plugins/FregePluginTest.groovy36
-rw-r--r--src/test/groovy/frege/gradle/tasks/FregeCompileTest.groovy39
-rw-r--r--todo.txt1
43 files changed, 35 insertions, 1629 deletions
diff --git a/.gitignore b/.gitignore
index 4d56716..0217c9d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,28 +1,6 @@
-
-# ignore IDEA files
-*.iml
-*.ipr
-*.iws
-.idea
-# ignore eclipse files
-.project
-.classpath
-.settings
-.scala_dependencies
-.externalToolBuilders
-.factorypath
-# ignore others
-out
-src/test/mod-test
-classes
-.cache
-.DS_Store
.gradle
-.springBeans
-bin
+.vscode
build
-*.pyc
+.project
-# Ignore Gradle GUI config
-gradle-app.setting
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 73f0f47..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-language: java
-jdk:
-- oraclejdk7
-sudo: false
-env:
- global:
- - secure: WXBVeS+6GtKNpQnmc00bOEVNRMOsADjg6XRd/PeZMa7IpYBE6HyaIOT/LocJ5J9p3lE6vmNM2kreHjUn6pPk6N3jcT9stbeNSbUFAY52WhmyS9Hq/5qGyuw2rAI+nAVL/yG71HWQsdyrYNjJDMq/CduHf67Gqkn64ihWC4yjr6I=
- - secure: RxhrCcuwVLvHdzw0eKE9vxA8rRMs+ZJ+uHu8//YsproWV03FYvit7KwjwvAe8QkLJXl4ePI8XuycTc/xONGqUca0kQ5sO+0ZUytbKKDDWxJ2bE/O741z5TS0ZDypcLwk6BfQyHBEHbd8szsNhe/x3a5kwBE43d5zKI0KCSGJLrU=
-after_success:
-- chmod +x ./deploy.sh; ./deploy.sh
-before_script:
-- echo "U=$SONATYPE_USERNAME"
-- echo "P=$SONATYPE_PASSWORD"
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index ba32583..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2015, Frege
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of frege-gradle-plugin nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/README.adoc b/README.adoc
deleted file mode 100644
index 18cbd52..0000000
--- a/README.adoc
+++ /dev/null
@@ -1,70 +0,0 @@
-
-= Frege Gradle Plugin
-
-This is the official Gradle plugin to compile Frege projects (https://github.com/Frege/frege). See the example project (https://github.com/mperry/frege-gradle-example) for examples on the usage of this plugin.
-
-This plugin is an alternative to using Gradle's JavaEx task to start the Frege tools.
-Those who prefer the latter might want to have a look at (https://github.com/Dierk/HelloFrege)
-
-== Plugin Application
-
-The gradle plugin portal page for Frege documents how to apply the Frege plugin (https://plugins.gradle.org/plugin/org.frege-lang).
-
-For applying the plugin in all Gradle versions use:
-```
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath "gradle.plugin.org.frege-lang:frege-gradle-plugin:0.8"
- }
-}
-
-apply plugin: "org.frege-lang"
-```
-
-To apply the plugin using the new incubating, plugin mechanism (since Gradle 2.1), add:
-```
-plugins {
- id "org.frege-lang" version "0.8"
-}
-```
-
-== Tasks
-
-This plugin creates the following tasks:
-
-* fregeRepl
-* fregeQuickCheck
-* fregeDoc
-* fregeNativeGen
-* compileFrege
-* compileTestFrege
-
-The plugin adds dependencies so that using the `build` task is typically all that is required to invoke the `compileFrege` and `compileTestFrege` tasks. These task dependencies include:
-
-* classes -> compileFrege -> compileJava
-* testClasses -> compileTestFrege -> compileTestJava
-* test -> fregeQuickCheck -> testClasses
-
-== Task Help
-
-TODO: Add options and descriptions for each task above.
-
-== Example
-
-See:
-
-* Plugin application: https://plugins.gradle.org/plugin/org.frege-lang
-* Plugin usage: https://github.com/mperry/frege-gradle-example
-
-== Continuous Integration
-
-The Travis CI build of this repository is at https://travis-ci.org/Frege/frege-gradle-plugin.
-
-== Snapshots
-
-Snapshot releases are available from the Sonatype repository at https://oss.sonatype.org/content/groups/public/org/frege-lang.
diff --git a/build.gradle b/build.gradle
index d3dd514..728043c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,89 +1,18 @@
-apply plugin: "groovy"
-apply plugin: "maven-publish" // I don't think we need this at all
-apply plugin: "signing"
-apply plugin: "idea"
-
-apply from: 'gradle/integTest.gradle'
-
-defaultTasks "build"
-
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
-
-ext {
- baseVersion = "0.9"
- isSnapshot = true
- snapshotAppendix = "-SNAPSHOT"
- projectVersion = baseVersion + (isSnapshot ? snapshotAppendix : "")
- projectGroup = "org.frege-lang"
-
- fregeBaseVersion = "3.25.84"
- fregeClassifier = ""
- fregeVersion = fregeBaseVersion + fregeClassifier
-
+plugins {
+ id 'groovy'
+ id 'java-gradle-plugin'
}
-// apply from: "gradle/sonatype.gradle" // not sure why that is here
-
-version = projectVersion
-group = projectGroup
-
repositories {
- mavenLocal()
mavenCentral()
-
- flatDir {
- dirs 'lib'
- }
}
dependencies {
- implementation "$projectGroup:frege:$fregeVersion"
- // api "$projectGroup:frege-repl-core:1.2" // this now comes with the frege distro
- implementation "$projectGroup:frege-native-gen:1.3"
- // api "org.functionaljava:functionaljava:4.4" // try without
-
- implementation gradleApi()
- implementation localGroovy()
- testImplementation gradleTestKit()
-
- testImplementation('org.spockframework:spock-core:1.0-groovy-2.4') {
- exclude module: 'groovy-all'
- }
-}
-
-// using the publishing plugin
-
-buildscript {
- repositories {
- maven {
- url "https://plugins.gradle.org/m2/"
- }
- }
- dependencies {
- classpath "com.gradle.publish:plugin-publish-plugin:0.9.1"
- }
+ testImplementation group: 'org.spockframework', name: 'spock-core', version: '2.0-groovy-3.0'
+ testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2")
+ testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2")
}
-// Details on how to publish to the gradle plugin portal
-// Go to http://plugins.gradle.org, get yourself a publishing key
-// and add it to ~/.gradle/gradle.properties as
-// For publishing, run the task publishPlugins.
-
-apply plugin: "com.gradle.plugin-publish"
-
-// The configuration example below shows the minimum required properties
-// configured to publish your plugin to the plugin portal
-pluginBundle {
- website = 'https://github.com/Frege/frege-gradle-plugin'
- vcsUrl = 'https://github.com/Frege/frege-gradle-plugin'
- description = 'Enabling Frege for compilation, testing, documentation, and supporting tools.'
- tags = ['frege', 'haskell', 'java']
-
- plugins {
- fregePlugin {
- id = 'org.frege-lang'
- displayName = 'Frege plugin'
- }
- }
-}
+tasks.withType(Test).configureEach {
+ useJUnitPlatform()
+} \ No newline at end of file
diff --git a/deploy.sh b/deploy.sh
deleted file mode 100755
index 7c4658b..0000000
--- a/deploy.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-./gradlew uploadArchives -PsonatypeUsername="${SONATYPE_USERNAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" -i -s
-RETVAL=$?
-
-if [ $RETVAL -eq 0 ]; then
- echo 'Completed publish!'
-else
- echo 'Publish failed.'
- return 1
-fi
diff --git a/docs/img/FileTypes.png b/docs/img/FileTypes.png
deleted file mode 100644
index d50073d..0000000
--- a/docs/img/FileTypes.png
+++ /dev/null
Binary files differ
diff --git a/docs/img/Frege_Gradle_Tasks.png b/docs/img/Frege_Gradle_Tasks.png
deleted file mode 100644
index 07c5968..0000000
--- a/docs/img/Frege_Gradle_Tasks.png
+++ /dev/null
Binary files differ
diff --git a/docs/img/external_tool_frepl.png b/docs/img/external_tool_frepl.png
deleted file mode 100644
index 3873970..0000000
--- a/docs/img/external_tool_frepl.png
+++ /dev/null
Binary files differ
diff --git a/docs/img/external_tool_run.png b/docs/img/external_tool_run.png
deleted file mode 100644
index 496f4bc..0000000
--- a/docs/img/external_tool_run.png
+++ /dev/null
Binary files differ
diff --git a/docs/img/external_tool_test.png b/docs/img/external_tool_test.png
deleted file mode 100644
index a44f4ac..0000000
--- a/docs/img/external_tool_test.png
+++ /dev/null
Binary files differ
diff --git a/docs/img/watcher_fregeCompile.png b/docs/img/watcher_fregeCompile.png
deleted file mode 100644
index b3b10b0..0000000
--- a/docs/img/watcher_fregeCompile.png
+++ /dev/null
Binary files differ
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index 493b0ae..0000000
--- a/gradle.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-#currently not needed
-
-signingEnabled = false
-sonatypeUsername = incorrectUsername
-sonatypePassword = incorrectPassword
-
-#(all,none,summary)
-org.gradle.warning.mode=all
diff --git a/gradle/integTest.gradle b/gradle/integTest.gradle
deleted file mode 100644
index 2ce286c..0000000
--- a/gradle/integTest.gradle
+++ /dev/null
@@ -1,48 +0,0 @@
-sourceSets {
- integTest {
- compileClasspath += main.output + test.output
- runtimeClasspath += main.output + test.output
- }
-}
-
-configurations {
- integTestCompile.extendsFrom testCompile
- integTestRuntime.extendsFrom testRuntime
-}
-
-task integTest(type: Test) {
- shouldRunAfter 'test'
- testClassesDirs = sourceSets.integTest.output.classesDirs
- classpath = sourceSets.integTest.runtimeClasspath
-}
-
-check.dependsOn(integTest)
-
-plugins.withType(org.gradle.plugins.ide.idea.IdeaPlugin) {
- idea {
- module {
- testSourceDirs += sourceSets.integTest.groovy.srcDirs
- testSourceDirs += sourceSets.integTest.resources.srcDirs
- scopes.TEST.plus.add(configurations.integTestCompile)
- scopes.TEST.plus.add(configurations.integTestRuntime)
- }
- }
-}
-
-
-task createClasspathManifest {
- def outputDir = file("$buildDir/$name")
-
- inputs.files sourceSets.main.runtimeClasspath
- outputs.dir outputDir
-
- doLast {
- outputDir.mkdirs()
- file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join("\n")
- }
-}
-
-dependencies {
- testRuntimeOnly files(createClasspathManifest)
- // integTestRuntime files(createClasspathManifest) // old
-}
diff --git a/gradle/sonatype.gradle b/gradle/sonatype.gradle
deleted file mode 100644
index adae7e6..0000000
--- a/gradle/sonatype.gradle
+++ /dev/null
@@ -1,98 +0,0 @@
-
-ext {
-
- sonatypeBaseUrl = "https://oss.sonatype.org"
- sonatypeSnapshotUrl = "$sonatypeBaseUrl/content/repositories/snapshots/"
- sonatypeRepositoryUrl = "$sonatypeBaseUrl/content/groups/public"
- sonatypeReleaseUrl = "$sonatypeBaseUrl/service/local/staging/deploy/maven2/"
- sonatypeUploadUrl = isSnapshot ? sonatypeSnapshotUrl : sonatypeReleaseUrl
-
- projectUrl = "https://github.com/Frege/frege-gradle-plugin"
- projectName = "Frege Gradle Plugin"
- pomProjectName = projectName
- baseJarName = "gradle-frege-plugin"
-
- groupName = "org.frege-lang"
- scmUrl = "git://github.com/Frege/frege-gradle-plugin.git"
- scmGitFile = "scm:git@github.com:Frege/frege-gradle-plugin.git"
- projectDescription = "Frege Gradle plugin"
-
- licenseName = "BSD 3-clause license"
- licenseUrl = 'http://opensource.org/licenses/BSD-3-Clause'
-
- organisation = groupName
-
- primaryEmail = "frege-programming-language@googlegroups.com"
-}
-
-Boolean doSigning() {
-
- signingEnabled.trim() == "true"
-}
-
-task javadocJar(type: Jar, dependsOn: "javadoc") {
- classifier = 'javadoc'
- from "build/docs/javadoc"
-}
-
-task sourcesJar(type: Jar) {
- from sourceSets.main.allSource
- classifier = 'sources'
-}
-
-artifacts {
- archives jar
- archives javadocJar
-
- archives sourcesJar
-}
-
-signing {
- required { doSigning() }
- sign configurations.archives
-}
-
-uploadArchives {
- enabled = true
- repositories {
- mavenDeployer {
- if (doSigning()) {
- beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
- }
-
-
- repository(url: sonatypeUploadUrl) {
- authentication(userName: sonatypeUsername, password: sonatypePassword)
- }
- pom {
- groupId = groupName
- project {
- name pomProjectName
- packaging 'jar'
- description projectDescription
- url projectUrl
- organization {
- name pomProjectName
- url projectUrl
- }
- scm {
- url scmUrl
- }
- licenses {
- license {
- name licenseName
- url licenseUrl
- distribution 'repo'
- }
- }
- developers {
- developer {
- email primaryEmail
- }
- }
- }
- }
- }
- }
-}
-
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 62d4c05..e708b1c 100644
--- a/gradle/wrapper/gradle-wrapper.jar
+++ b/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 9995423..f371643 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Tue Jun 23 13:39:19 CEST 2020
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index fbd7c51..4f906e0 100755
--- a/gradlew
+++ b/gradlew
@@ -130,7 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
+
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
diff --git a/gradlew.bat b/gradlew.bat
index a9f778a..ac1b06f 100755..100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -54,7 +54,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -64,21 +64,6 @@ echo location of your Java installation.
goto fail
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
:execute
@rem Setup the command line
@@ -86,7 +71,7 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
diff --git a/lib/frege-3.25.84.jar b/lib/frege-3.25.84.jar
deleted file mode 100644
index a0090fc..0000000
--- a/lib/frege-3.25.84.jar
+++ /dev/null
Binary files differ
diff --git a/src/integTest/groovy/frege/gradle/integtest/fixtures/AbstractFregeIntegrationSpec.groovy b/src/integTest/groovy/frege/gradle/integtest/fixtures/AbstractFregeIntegrationSpec.groovy
deleted file mode 100644
index 71d3ea8..0000000
--- a/src/integTest/groovy/frege/gradle/integtest/fixtures/AbstractFregeIntegrationSpec.groovy
+++ /dev/null
@@ -1,67 +0,0 @@
-package frege.gradle.integtest.fixtures
-
-import org.gradle.testkit.runner.GradleRunner
-import org.gradle.testkit.runner.BuildResult
-import org.junit.Rule
-import org.junit.rules.TemporaryFolder
-import spock.lang.Specification
-
-class AbstractFregeIntegrationSpec extends Specification {
- public static final String DEFAULT_FREGE_VERSION = "3.24.405"
- List<File> pluginClasspath
-
- @Rule
- final TemporaryFolder testProjectDir = new TemporaryFolder()
- File buildFile
-
- def setup() {
- buildFile = testProjectDir.newFile('build.gradle')
-
- testProjectDir.newFolder("src", "main", "java", "org", "frege", "java")
- testProjectDir.newFolder("src", "main", "frege", "org", "frege")
-
- def pluginClasspathResource = getClass().classLoader.findResource("plugin-classpath.txt")
- if (pluginClasspathResource == null) {
- // try again via file reference
- pluginClasspathResource = new File("build/createClasspathManifest/plugin-classpath.txt")
- if (pluginClasspathResource == null) {
- throw new IllegalStateException("Did not find plugin classpath resource, run `integTestClasses` build task.")
- }
- }
- pluginClasspath = pluginClasspathResource.readLines().collect { new File(it) }
- }
-
-
- BuildResult run(String task) {
- run(null, task);
- }
-
- BuildResult run(String gradleVersion, String task) {
- def writer = new StringWriter();
- GradleRunner runner = newRunner(task, writer, gradleVersion)
- def result = runner.build()
- println writer;
- return result;
- }
-
- BuildResult fail(String task) {
- def writer = new StringWriter();
- GradleRunner runner = newRunner(task, writer, null)
- def result = runner.buildAndFail()
- println writer;
- return result;
- }
-
- private GradleRunner newRunner(String task, StringWriter writer, String gradleVersion) {
- def runner = GradleRunner.create()
- .withProjectDir(testProjectDir.root)
- .withArguments(task)
- .withPluginClasspath(pluginClasspath)
- .forwardStdOutput(writer)
- if (gradleVersion) {
- runner.withGradleVersion(gradleVersion)
- }
- runner
- }
-
-}
diff --git a/src/integTest/groovy/frege/gradle/plugins/FregePluginIntegTest.groovy b/src/integTest/groovy/frege/gradle/plugins/FregePluginIntegTest.groovy
deleted file mode 100644
index 798d333..0000000
--- a/src/integTest/groovy/frege/gradle/plugins/FregePluginIntegTest.groovy
+++ /dev/null
@@ -1,208 +0,0 @@
-package frege.gradle.plugins
-import frege.gradle.integtest.fixtures.AbstractFregeIntegrationSpec
-import org.gradle.testkit.runner.BuildResult
-import spock.lang.Unroll
-
-import static org.gradle.testkit.runner.TaskOutcome.NO_SOURCE
-import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
-import static org.gradle.testkit.runner.TaskOutcome.UP_TO_DATE
-
-class FregePluginIntegTest extends AbstractFregeIntegrationSpec {
-
- def setup() {
- buildFile << """
- plugins {
- id 'org.frege-lang'
- }
-
- repositories {
- jcenter()
- flatDir {
- dirs '${new File(".").absolutePath}/lib'
- }
- }
- compileFrege {
- classpath = files()
- }
- """
- }
-
- def "can handle non existing source directories"() {
- given:
- buildFile << """
- dependencies {
- compile "org.frege-lang:frege:$DEFAULT_FREGE_VERSION"
- }
- """
-
- when:
- def result = run(gradleVersion, "classes")
- then:
- result.task(":compileFrege").outcome == NO_SOURCE