|
| 1 | +buildscript { |
| 2 | + project.ext.CERN_VM = System.getProperty('CERN_TECHNET_VM') ?: System.getenv('CERN_TECHNET_VM') ?: false |
| 3 | + project.ext.TRAVIS_CI = System.getProperty('TRAVIS') ?: System.getenv('TRAVIS') ?: false |
| 4 | + project.ext.DEPLOYMENT = System.getProperty('deployment') ?: false |
| 5 | + project.ext.VCS_TAG = System.getProperty('TRAVIS_TAG') ?: System.getenv('TRAVIS_TAG') |
| 6 | + project.ext.POM = [ |
| 7 | + groupId : 'org.tensorics', |
| 8 | + artifactId : 'tensorics-kotlin', |
| 9 | + description: 'Kotlin DSL for tensorics.', |
| 10 | + developers : [ |
| 11 | + [ |
| 12 | + id : 'kaifox', |
| 13 | + name : 'Kajetan Fuchsberger', |
| 14 | + |
| 15 | + ], |
| 16 | + [ |
| 17 | + id : 'agorzawski', |
| 18 | + name : 'Arek Gorzawski', |
| 19 | + |
| 20 | + ], |
| 21 | + [ |
| 22 | + id : 'michi42', |
| 23 | + name : 'Michi Hostettler', |
| 24 | + |
| 25 | + ], |
| 26 | + [ |
| 27 | + id : 'andreacalia', |
| 28 | + name : 'Andrea Calia', |
| 29 | + |
| 30 | + ] |
| 31 | + ]] |
| 32 | + project.ext.INFO = [ |
| 33 | + repo : 'https://github.com/tensorics/tensorics-kotlin.git', |
| 34 | + url : 'http://tensorics.org/', |
| 35 | + github : 'https://github.com/tensorics/tensorics-kotlin', |
| 36 | + githubIssues: 'https://github.com/tensorics/tensorics-kotlin/issues' |
| 37 | + ] |
| 38 | + project.ext.BINTRAY = [ |
| 39 | + repo : 'tensorics-repo', |
| 40 | + name : 'org.tensorics:tensorics-core', |
| 41 | + organization: 'tensorics', |
| 42 | + userName : 'tensorics-dev', |
| 43 | + apiToken : System.getenv('BINTRAY_API_TOKEN') |
| 44 | + ] |
| 45 | + |
| 46 | + repositories { |
| 47 | + if (CERN_VM) { |
| 48 | + maven { url 'http://artifactory.cern.ch/gradle-plugins' } |
| 49 | + maven { url 'http://artifactory.cern.ch/ds-jcenter' } |
| 50 | + maven { url 'http://artifactory.cern.ch/development' } |
| 51 | + } else { |
| 52 | + mavenCentral() |
| 53 | + jcenter() |
| 54 | + } |
| 55 | + } |
| 56 | + dependencies { |
| 57 | + classpath 'com.netflix.nebula:nebula-publishing-plugin:5.1.0' |
| 58 | + classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' |
| 59 | + } |
| 60 | +} |
| 61 | + |
| 62 | +apply plugin: 'java' |
| 63 | +apply plugin: 'jacoco' |
| 64 | +apply plugin: 'maven' |
| 65 | +apply plugin: 'maven-publish' |
| 66 | +apply plugin: 'nebula.maven-publish' |
| 67 | +apply plugin: 'com.jfrog.bintray' |
| 68 | + |
| 69 | +repositories { |
| 70 | + if (CERN_VM) { |
| 71 | + maven { url 'http://artifactory.cern.ch/ds-jcenter' } |
| 72 | + maven { url 'http://artifactory.cern.ch/development' } |
| 73 | + } else { |
| 74 | + mavenCentral() |
| 75 | + jcenter() |
| 76 | + } |
| 77 | +} |
| 78 | + |
| 79 | +if (DEPLOYMENT) { |
| 80 | + println 'Applying deployment scripts' |
| 81 | + apply from: './scripts/bintray-deploy.gradle' |
| 82 | +} |
| 83 | + |
| 84 | +group 'org.streamingpool' |
| 85 | + |
| 86 | +sourceCompatibility = 1.8 |
| 87 | + |
| 88 | +dependencies { |
| 89 | + compile 'org.tensorics:tensorics-core:+' |
| 90 | + compile 'org.jscience:jscience:4.3.1' |
| 91 | + compile 'com.google.guava:guava:21.0' |
| 92 | + compile 'org.hamcrest:hamcrest-all:1.3' |
| 93 | + compile 'org.slf4j:slf4j-api:1.7.21' |
| 94 | + |
| 95 | + testCompile 'junit:junit:4.12' |
| 96 | + testCompile 'org.slf4j:slf4j-log4j12:+' |
| 97 | + testCompile 'pl.pragmatists:JUnitParams:1.0.4' |
| 98 | + testCompile 'org.mockito:mockito-core:1.10.19' |
| 99 | + testCompile 'org.objenesis:objenesis:2.4' |
| 100 | + testCompile 'com.openpojo:openpojo:0.8.4' |
| 101 | + testCompile 'org.assertj:assertj-core:3.6.1' |
| 102 | + testCompile 'nl.jqno.equalsverifier:equalsverifier:2.3.1' |
| 103 | +} |
| 104 | + |
| 105 | +sourceSets { |
| 106 | + main { |
| 107 | + java { |
| 108 | + srcDir 'src/java' |
| 109 | + } |
| 110 | + } |
| 111 | + test { |
| 112 | + java { |
| 113 | + srcDir 'src/test' |
| 114 | + } |
| 115 | + } |
| 116 | +} |
| 117 | + |
| 118 | +javadoc { options.encoding = "UTF-8" } |
| 119 | + |
| 120 | +task wrapper(type: Wrapper) { gradleVersion = '4.0' } |
| 121 | + |
| 122 | +task javadocJar(type: Jar) { |
| 123 | + classifier = 'javadoc' |
| 124 | + from javadoc |
| 125 | +} |
| 126 | + |
| 127 | +task sourcesJar(type: Jar) { |
| 128 | + classifier = 'sources' |
| 129 | + from sourceSets.main.allSource |
| 130 | +} |
| 131 | + |
| 132 | +artifacts { archives javadocJar, sourcesJar } |
| 133 | + |
| 134 | +jacocoTestReport { |
| 135 | + reports { |
| 136 | + xml.enabled true |
| 137 | + xml.destination new File("${buildDir}/reports/jacoco/report.xml") |
| 138 | + html.enabled true |
| 139 | + csv.enabled false |
| 140 | + } |
| 141 | +} |
0 commit comments