tikhomirov@452: def isRelease = false
tikhomirov@452:
tikhomirov@452: version = '0.9.0'
tikhomirov@452: description = 'Pure Java API and Toolkit for Mercurial DVCS'
tikhomirov@452: group = 'org.tmatesoft.hg4j'
tikhomirov@452:
tikhomirov@452: apply plugin : 'java'
tikhomirov@452: apply plugin : 'maven'
tikhomirov@452:
tikhomirov@452: sourceCompatibility = '1.5'
tikhomirov@452: targetCompatibility = '1.5'
tikhomirov@452:
tikhomirov@452: sourceSets {
tikhomirov@452: main {
tikhomirov@452: java {
tikhomirov@452: srcDir 'src/'
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452: test {
tikhomirov@452: java {
tikhomirov@452: srcDir 'test/'
tikhomirov@452: }
tikhomirov@452: resources {
tikhomirov@452: srcDir 'test-data/'
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452: cli {
tikhomirov@452: java {
tikhomirov@452: srcDir 'cmdline/'
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: repositories {
tikhomirov@452: mavenLocal()
tikhomirov@452: mavenCentral()
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: dependencies {
tikhomirov@452: testCompile 'junit:junit:4.8.2'
tikhomirov@452: cliCompile 'junit:junit:4.8.2'
tikhomirov@452: cliCompile files(sourceSets.main.output) {
tikhomirov@452: builtBy compileJava
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: configurations {
tikhomirov@452: deployJars
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: def sharedMetaInf = {
tikhomirov@452: from project.file('COPYING')
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452:
tikhomirov@452: task sourcesJar(type: Jar) {
tikhomirov@452: classifier = 'src'
tikhomirov@452: from sourceSets.main.java, sourceSets.test.java, sourceSets.cli.java
tikhomirov@452: metaInf sharedMetaInf
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: task cmdlineJar(type: Jar) {
tikhomirov@452: appendix = 'console'
tikhomirov@452: from sourceSets.cli.output
tikhomirov@452: metaInf sharedMetaInf
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: jar {
tikhomirov@452: manifest {
tikhomirov@452: attributes ("Implementation-Version": version)
tikhomirov@452: }
tikhomirov@452: metaInf sharedMetaInf
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: artifacts {
tikhomirov@452: archives sourcesJar, cmdlineJar
tikhomirov@452: deployJars jar, sourcesJar
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: install {
tikhomirov@452: configuration = configurations.deployJars
tikhomirov@452: repositories.mavenDeployer {
tikhomirov@452: addFilter('f1') { artifact, file ->
tikhomirov@452: println file.name
tikhomirov@452: println artifact.ext
tikhomirov@452: println file.name - ('.' + artifact.ext)
tikhomirov@452: println ' '
tikhomirov@452: def fname = file.name - ('.' + artifact.ext)
tikhomirov@452: println fname.endsWith('src')
tikhomirov@452: fname.endsWith('src')
tikhomirov@452: }
tikhomirov@452: addFilter('f2') { artifact, file ->
tikhomirov@452: def fname = file.name - ('.' + artifact.ext)
tikhomirov@452: fname.endsWith('console')
tikhomirov@452: }
tikhomirov@452: addFilter('f3') { artifact, file ->
tikhomirov@452: def fname = file.name - ('.' + artifact.ext)
tikhomirov@452: fname.endsWith(version)
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452: }
tikhomirov@452:
tikhomirov@452: test {
tikhomirov@452: //
tikhomirov@452: //
tikhomirov@452: //
tikhomirov@452:
tikhomirov@452: systemProperties 'hg4j.tests.repos' : 'value'
tikhomirov@452: systemProperties 'hg4j.tests.remote' : 'http://hg.serpentine.com/tutorial/hello'
tikhomirov@452: }