def custom = { "$rootDir/gradle/${it}.gradle" }

buildscript {
  repositories {
    jcenter()
    maven {
      url 'https://github.com/serkan-ozal/maven-repository/raw/master/'
      url "https://oss.sonatype.org/content/repositories/snapshots"
    }

  }
  dependencies {
    classpath 'com.bmuschko:gradle-nexus-plugin:2.2'
    classpath 'com.github.lkishalmi.gradle:gradle-bom-plugin:0.3'

  }
}

subprojects {

  apply plugin: 'java'
  apply plugin: 'groovy'
  apply plugin: 'maven'

  if (project.name != "micro-tutorial") {
    apply plugin: 'com.bmuschko.nexus'
  }

  sourceCompatibility = 1.8
  targetCompatibility = 1.8

  jar {
    manifest {
      attributes 'Implementation-Title': 'Gradle Quickstart', 'Implementation-Version': version
    }
  }

  repositories {
    mavenCentral()
    maven { url "http://repo.maven.apache.org/maven2" }
    jcenter()
  }

  dependencies {

    compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.16.18'

    testCompile group: 'junit', name: 'junit', version: '4.12'
    testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.5'
    testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: hamcrestVersion

    testCompileOnly group: 'org.projectlombok', name: 'lombok', version: '1.16.18'

  }

  test {
    systemProperties 'property': 'value'

    testLogging {
      events "started", "passed", "skipped", "failed"
    }
  }

}

