123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- subprojects {
- def jgit = new org.mdonoughe.JGitDescribeTask()
- jgit.dir = new File(projectDir, '../.git')
- jgit.subdir = project.name
- project.version = jgit.getDescription() + '-SNAPSHOT'
-
- group = 'com.dmdirc.parser'
-
- apply plugin: 'maven-publish'
- apply plugin: 'java'
-
- sourceSets {
- main {
- java {
- srcDir 'src'
- }
- }
- test {
- java {
- srcDir 'test'
- }
- }
- }
-
- publishing {
- publications {
- mavenJava(MavenPublication) {
- artifact jar
- }
- }
- repositories {
- maven {
- name 'snapshots'
- url 'http://nexus.dmdirc.com/nexus/content/repositories/snapshots/'
- }
- }
- }
-
- sourceCompatibility = 1.7
- targetCompatibility = 1.7
-
- repositories.mavenCentral()
-
- dependencies {
- testCompile group: 'junit', name: 'junit', version: '4.+'
- testCompile group: 'org.mockito', name: 'mockito-all', version: '1.+'
- }
-
- task getCredentials << {
- def target = file('../nexus-teamcity.gradle')
- if (!target.exists()) {
- new URL('http://www.dmdirc.com/private/nexus-teamcity.gradle').withInputStream{
- i -> target.withOutputStream { it << i }
- }
- }
-
- apply from: '../nexus-teamcity.gradle'
- project.publishing.repositories[0].credentials {
- username "$nexusUser"
- password "$nexusPass"
- }
- }
-
- task publishSnapshot(dependsOn: ['getCredentials', 'publishMavenJavaPublicationToSnapshotsRepository']) << {
- }
- }
-
- task wrapper(type: Wrapper) {
- gradleVersion = '2.1'
- }
-
- def find(name) {
- if (allprojects.find { it.name == name }) {
- project(name)
- } else if (allprojects.find { it.name == 'parser:' + name }) {
- project('parser:' + name)
- } else if (allprojects.find { it.name == 'modules:parser:' + name }) {
- project('modules:parser:' + name)
- } else {
- println "Couldn't find project $name"
- }
- }
-
- buildscript {
- repositories {
- mavenCentral()
- maven {
- url 'http://nexus.dmdirc.com/nexus/content/repositories/thirdparty/'
- }
- }
-
- dependencies {
- classpath group: 'com.github.shanemcc', name: 'jgit-describe', version: '0.5'
- classpath group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '2.3.1.+'
- }
- }
|