diff --git a/build.gradle b/build.gradle index bebd73e0ae..4643f6b1c0 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,7 @@ buildscript { } } apply plugin: 'java' +apply plugin: 'groovy' apply plugin: 'eclipse' apply plugin: 'maven-publish' apply plugin: "at.bxm.svntools" @@ -233,6 +234,9 @@ sourceSets { srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java') exclude excludedJavaSources } + groovy { + srcDirs = getDirectoryInActiveComponentsIfExists('src/main/groovy') + } resources { srcDirs = getDirectoryInActiveComponentsIfExists('src/main/java') srcDirs += getDirectoryInActiveComponentsIfExists('config') @@ -256,6 +260,9 @@ sourceSets { java { srcDirs = getDirectoryInActiveComponentsIfExists('src/test/java') } + groovy { + srcDirs = getDirectoryInActiveComponentsIfExists('src/test/groovy') + } resources { srcDirs = getDirectoryInActiveComponentsIfExists('src/test/java') } diff --git a/framework/base/groovyScript/test/FileUtilTests.groovy b/framework/base/src/test/groovy/org/apache/ofbiz/base/util/FileUtilTests.groovy similarity index 84% rename from framework/base/groovyScript/test/FileUtilTests.groovy rename to framework/base/src/test/groovy/org/apache/ofbiz/base/util/FileUtilTests.groovy index 9a7d0af4c3..ff39594f05 100644 --- a/framework/base/groovyScript/test/FileUtilTests.groovy +++ b/framework/base/src/test/groovy/org/apache/ofbiz/base/util/FileUtilTests.groovy @@ -1,4 +1,4 @@ -/******************************************************************************* +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -15,20 +15,18 @@ * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - *******************************************************************************/ - + */ +package org.apache.ofbiz.base.util; import org.apache.commons.io.FileUtils -import org.apache.ofbiz.base.util.FileUtil -import org.apache.ofbiz.base.util.UtilProperties -import org.apache.ofbiz.testtools.GroovyScriptTestCase - -class FileUtilTests extends GroovyScriptTestCase { +import org.junit.Test +public class FileUtilTests { /** * Test FileUtil zipFileStream and unzipFileToFolder methods, using README.adoc */ - void testZipReadme() { + @Test + void zipReadme() { String zipFilePath = UtilProperties.getPropertyValue("general", "http.upload.tmprepository", "runtime/tmp") String zipName = 'README.adoc.zip' String fileName = 'README.adoc'