build.gradle 2.08 KB
Newer Older
Remi  PLANEL's avatar
Remi PLANEL committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
buildscript {
    repositories {
        mavenLocal()
        jcenter()
        maven {
            url "https://oss.jfrog.org/artifactory/oss-snapshot-local"
        }
    }
    dependencies {
        classpath group: 'org.intermine', name: 'plugin', version: System.getProperty("imVersion")
        classpath 'com.bmuschko:gradle-cargo-plugin:2.3'
    }
}

ext {
  mineRelease = project.hasProperty('release') ? "." + release : ''
17
  mineName = "legiolist"
Remi  PLANEL's avatar
Remi PLANEL committed
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  minePropertyFileName = "${mineName}.properties$mineRelease"
  minePropertyFile = "${System.env.HOME}/.intermine/$minePropertyFileName"
  println "Using properties file: '$minePropertyFile'"
}

subprojects {
  apply plugin: 'java'
  apply plugin: 'maven'

  sourceCompatibility = 1.8
  targetCompatibility = 1.8
  
  repositories {
    mavenLocal()
    jcenter()
    maven { url 'https://clojars.org/repo' }
    maven {
        url "https://oss.jfrog.org/artifactory/oss-snapshot-local"
    }
    maven {
        url 'http://www.ebi.ac.uk/intact/maven/nexus/content/repositories/ebi-repo/'
    }
  }

  dependencies {
    compile group: "org.intermine", name: "intermine-resources", version: System.getProperty("imVersion")
    compile('ant:ant:1.6.5')
    testCompile group: 'junit', name: 'junit', version: '4.8.2'
  }

  task copyMineProperties(type: Copy) {
    description "Copies mine specific intermine.properties file (from .intermine directory) into resources output to be included in the war"
    dependsOn 'processResources'
    from (minePropertyFile)
    into sourceSets.main.output.resourcesDir
    rename { fileName -> fileName.replace("$minePropertyFileName", "intermine.properties") }
    inputs.sourceFiles.stopExecutionIfEmpty()
  }
}

task clean(type: Delete) {
    println "cleaning"
    delete "idresolver.cache"
    println "deleting idresolver cache"
    delete "datasources.xml"
    println "deleting datasources.xml"
    delete "organisms.xml"
    println "deleting organisms.xml"
    delete "publications.xml"
    println "deleting publications.xml"
    delete fileTree('.') {
        include '*.log'
    }
    println "deleted log files"
}