apply plugin: 'java'
apply plugin: 'com.bmuschko.nexus'

targetCompatibility = '1.7'
sourceCompatibility = '1.7'

project.group = GROUP
project.version = VERSION_NAME

dependencies {
  compile dep.rxJava
  compile dep.findBugs

  testCompile dep.junit
  testCompile dep.assertj
}

if (JavaVersion.current().isJava8Compatible()) {
  allprojects {
    tasks.withType(Javadoc) {
      options.addStringOption('Xdoclint:none', '-quiet')
    }
  }
}

modifyPom {
  project {
    name 'RxGroups library'
    description POM_DESCRIPTION
    url POM_SCM_URL
    inceptionYear '2016'
    version VERSION_NAME
    groupId GROUP
    artifactId 'rxgroups'

    scm {
      url POM_SCM_URL
      connection POM_SCM_CONNECTION
      developerConnection POM_SCM_DEV_CONNECTION
    }

    licenses {
      license {
        name POM_LICENSE_NAME
        url POM_LICENSE_URL
        distribution POM_LICENSE_DIST
      }
    }

    developers {
      developer {
        id POM_DEVELOPER_ID
        name POM_DEVELOPER_NAME
        email 'android@airbnb.com'
      }
    }
  }
}

extraArchive {
  sources = true
  tests = false
  javadoc = true
}

nexus {
  sign = !project.ext.isCi
  repositoryUrl = project.ext.repositoryUrl
  snapshotRepositoryUrl = project.ext.snapshotRepositoryUrl
}
