Skip to content

Commit

Permalink
Separete test project folders and update gradle build tools to 3.0.0-…
Browse files Browse the repository at this point in the history
…beta6
  • Loading branch information
warnyul committed Sep 19, 2017
1 parent 15e494c commit 00c2e2a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.gradle/
.idea/
build/
out/
local.properties
4 changes: 2 additions & 2 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jacocoTestReport {
dependencies {
compile gradleApi()
compile localGroovy()
compileOnly 'com.android.tools.build:gradle:3.0.0-beta4'
testCompile 'com.android.tools.build:gradle:3.0.0-beta4'
compileOnly 'com.android.tools.build:gradle:3.0.0-beta6'
testCompile 'com.android.tools.build:gradle:3.0.0-beta6'
testCompile gradleTestKit()
testCompile('org.spockframework:spock-core:1.1-groovy-2.4') {
exclude module: 'groovy-all'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,20 @@ abstract class AbstractProjectBuilderSpec extends Specification {
protected File root

protected ProjectInternal project
private static int testFolderId = 0;

def setup() {
root = new File('build/tmp/test')
root = new File("build/tmp/test-app${testFolderId++}")
root.mkdirs()
cleanFolder(root)
project = TestUtil.createRootProject(root)
}

public static void cleanFolder(File folder) {
static void cleanFolder(File folder) {
File[] files = folder.listFiles();
if(files!=null) { //some JVMs return null for empty dirs
for(File f: files) {
if(f.isDirectory()) {
if (files != null) { //some JVMs return null for empty dirs
for (File f : files) {
if (f.isDirectory()) {
cleanFolder(f);
} else {
f.delete();
Expand Down

0 comments on commit 00c2e2a

Please sign in to comment.