aboutsummaryrefslogtreecommitdiff
path: root/gradle-model/build.gradle
blob: f4a845804d3eea4ca60f986df97d0a4e625318ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
apply plugin: 'java'
apply plugin: 'clone-artifacts'
apply plugin: 'idea'

def toolingApiVersion = gradle.gradleVersion

// Custom config that cloneArtifact will not look into, since this
// artifact is not in mavenCentral, but in the gradle repo instead.
configurations{
  gradleRepo
}

dependencies {
    compile project(':builder-model')

    testCompile 'junit:junit:3.8.1'
    testCompile project(':builder')

    // Need an SLF4J implementation at runtime
    testRuntime 'org.slf4j:slf4j-simple:1.7.2'

    // this is technically testCompile, but we don't want
    // it in there to avoid breaking cloneArtifact.
    // we'll add it to the test compile classpath manually below
    gradleRepo "org.gradle:gradle-tooling-api:${toolingApiVersion}"

}

//Include custom for compilation
sourceSets.test.compileClasspath += configurations.gradleRepo
sourceSets.test.runtimeClasspath += configurations.gradleRepo

def getVersion() {
    if (project.has("release")) {
        return project.ext.baseVersion
    }

    return project.ext.baseVersion + '-SNAPSHOT'
}

test.dependsOn ':gradle:publishLocal'

idea {
    module {
        scopes.COMPILE.plus += configurations.gradleRepo
    }
}