buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        maven {
            url "https://ihealthbuild.agilexhealth.com/artifactory/plugins-release-local"
        }
        maven {
            url "https://ihealthbuild.agilexhealth.com/artifactory/plugins-snapshot-local"
        }
    }

    dependencies {
        classpath group: "com.agilex.build",
                name: "buildPlugin",
                version: "1.0-SNAPSHOT"
    }
}
apply plugin: 'build'

apply plugin: 'maven-publish'
publishing {
    repositories {
        maven {
            name 'Release'
            url 'https://ihealthbuild.agilexhealth.com/artifactory/agilex'
            credentials {
                username "${artifactoryUser}"
                password "${artifactoryPass}"
            }
        }
        maven {
            name 'Final'
            url 'https://ihealthbuild.agilexhealth.com/artifactory/agilex'
            credentials {
                username "${artifactoryUser}"
                password "${artifactoryPass}"
            }
        }
        maven {
            name 'Snapshot'
            url 'https://ihealthbuild.agilexhealth.com/artifactory/agilex'
            credentials {
                username "${artifactoryUser}"
                password "${artifactoryPass}"
            }
        }
    }

    publications {
        maven(MavenPublication) {
            version "${project.buildArgs.buildVersion}"

            from components.java
        }
    }
}

apply plugin: 'eclipse'
apply plugin: 'idea'

archivesBaseName = 'SchedulingManagerLib'
group = 'com.agilex.vamf.scheduling'

dependencies {
  compile 'com.sun.jersey:jersey-json:1.12'
  compile 'org.mongodb:mongo-java-driver:2.10.1'
  compile 'javax.ws.rs:jsr311-api:1.1.1'
  runtime('agilex:agilex-commons:0.3.4') {
	  exclude module: 'spring-aop'
	  exclude module: 'spring-beans'
	  exclude module: 'spring-context'
	  exclude module: 'spring-context-support'
	  exclude module: 'spring-core'
	  exclude module: 'spring-expression'
	  exclude module: 'spring-test'
	  transitive=false
  }
  testCompile "org.springframework:spring-tx:3.1.1.RELEASE"
  testCompile "org.springframework:spring-web:3.1.1.RELEASE"
  testCompile "org.springframework:spring-core:3.1.1.RELEASE"
  testCompile "org.springframework:spring-beans:3.1.1.RELEASE"
  testCompile "org.springframework:spring-aop:3.1.1.RELEASE"
  testCompile "org.springframework:spring-web:3.1.1.RELEASE"
  testCompile "org.springframework:spring-asm:3.1.1.RELEASE"
  testCompile "org.springframework:spring-context:3.1.1.RELEASE"
  testCompile "org.springframework:spring-expression:3.1.1.RELEASE"
}
