Tests-on-jvm should be a subproject

This commit is contained in:
Jan Berkel 2014-12-17 12:47:39 +01:00
parent 5248350953
commit cc6c6bf096
3 changed files with 11 additions and 10 deletions

View file

@ -77,7 +77,9 @@ android {
buildTypes { buildTypes {
release { release {
signingConfig signingConfigs.release if (project.hasProperty('storeFile')) {
signingConfig signingConfigs.release
}
} }
} }
@ -105,11 +107,6 @@ task checkstyle(type: Checkstyle) {
classpath = files() classpath = files()
} }
task testsOnJVM(type: GradleBuild, dependsOn: assembleDebug) {
buildFile = 'tests-on-jvm/build.gradle'
tasks = ['test']
}
if (project.hasProperty('keyAlias')) { if (project.hasProperty('keyAlias')) {
android.signingConfigs.release.keyAlias = keyAlias android.signingConfigs.release.keyAlias = keyAlias
} }

View file

@ -2,3 +2,4 @@ include ':plugins:Android-PullToRefresh:library'
include ':plugins:ckChangeLog:library' include ':plugins:ckChangeLog:library'
include ':plugins:HoloColorPicker' include ':plugins:HoloColorPicker'
include ':plugins:openpgp-api-library' include ':plugins:openpgp-api-library'
include ':tests-on-jvm'

View file

@ -5,8 +5,8 @@ repositories {
apply plugin: 'java' apply plugin: 'java'
dependencies { dependencies {
testCompile 'junit:junit:4.+' testCompile project(':')
testCompile fileTree(dir: '../libs', include: '*.jar') testCompile 'junit:junit:4.12'
} }
sourceSets { sourceSets {
@ -17,14 +17,17 @@ sourceSets {
} }
test { test {
compileClasspath += files(['../build/intermediates/classes/debug']) compileClasspath += files(rootProject.compileDebugJava.destinationDir)
runtimeClasspath += files(['../build/intermediates/classes/debug']) runtimeClasspath += files(rootProject.compileDebugJava.destinationDir)
runtimeClasspath += rootProject.compileDebugJava.classpath
java { java {
srcDirs = ['src'] srcDirs = ['src']
} }
} }
} }
test.dependsOn ':compileDebugJava'
task wrapper(type: Wrapper) { task wrapper(type: Wrapper) {
gradleVersion = '1.11' gradleVersion = '1.11'
} }