blob: 83e5ea8f51a81d8a2c0ab41a815dcda172ad40cd [file] [log] [blame]
Yigit Boyar35e303e2015-01-09 10:43:24 -08001ext.kotlinVersion = '0.10.195'
Yigit Boyar840f0ce2014-12-12 16:45:00 -08002ext.releaseVersion = "0.3"
3ext.snapshotVersion = "0.3-SNAPSHOT"
Yigit Boyarf9e51c02015-03-12 14:30:29 -07004ext.androidPluginVersion = "1.0.1"
Yigit Boyar895b6182015-03-11 17:05:50 -07005ext.javaTargetCompatibility = 1.6
6ext.javaSourceCompatibility = 1.6
Yigit Boyarf9e51c02015-03-12 14:30:29 -07007ext.mavenRepoDir = "${projectDir}/maven-repo"
8println "local maven repo is ${ext.mavenRepoDir}."
9new File(ext.mavenRepoDir).mkdir()
Yigit Boyar840f0ce2014-12-12 16:45:00 -080010subprojects {
Yigit Boyarf9e51c02015-03-12 14:30:29 -070011 apply plugin: 'maven'
Yigit Boyar840f0ce2014-12-12 16:45:00 -080012 group = 'com.android.databinding'
13 version = '0.3-SNAPSHOT'
14 repositories {
Yigit Boyar840f0ce2014-12-12 16:45:00 -080015 mavenCentral()
Yigit Boyarf9e51c02015-03-12 14:30:29 -070016 maven {
17 url "file://$mavenRepoDir"
18 }
Yigit Boyar840f0ce2014-12-12 16:45:00 -080019 }
Yigit Boyarf9e51c02015-03-12 14:30:29 -070020 uploadArchives {
21 repositories {
22 mavenDeployer {
23 repository(url: "file://$mavenRepoDir")
24 }
25 }
26 }
27}
28
29task deleteRepo(type: Delete) {
30 delete "$mavenRepoDir"
31}
32
33file('integration-tests').listFiles().findAll { it.isDirectory() }.each {
34 println("${it.getAbsolutePath()}")
35 def testTask = project.tasks.create "runTestsOf${it.getName().capitalize()}", Exec
36 testTask.workingDir 'integration-tests/TestApp'
37 //on linux
38 testTask.commandLine './gradlew'
39 testTask.args 'clean', 'connectedCheck', '--info'
40 testTask.dependsOn subprojects.uploadArchives
41}
42
43task runIntegrationTests {
44 dependsOn tasks.findAll { task -> task.name.startsWith('runTestsOf') }
45}
46
47task runAllTests {
48 dependsOn runIntegrationTests
49}
50
51allprojects {
52 afterEvaluate { project ->
53 runAllTests.dependsOn project.tasks.findAll {task -> task.name.equals('test')}
54 }
55}
56
57
58task rebuildRepo() {
59 dependsOn deleteRepo
60 dependsOn subprojects.uploadArchives
Yigit Boyar840f0ce2014-12-12 16:45:00 -080061}