Permalink
Fetching contributors…
Cannot retrieve contributors at this time
98 lines (75 sloc) 2.66 KB
buildscript {
repositories {
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3" //for publications to Bintray / central
classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.11.0' // later versions don't work on JDK6
//Needed so that release notes and release workflow plugin can be applied in separate gradle/*.gradle build files
classpath project.'dependencies.mockito-release-tools'
}
}
plugins {
id 'com.gradle.build-scan' version '1.3'
id 'me.champeau.buildscan-recipes' version '0.1.7'
}
description = 'Mockito mock objects library core API and implementation'
ext {
artifactName = 'mockito-core'
bintrayAutoPublish = true
bintrayRepo = 'maven'
mavenCentralSync = true
}
allprojects {
repositories {
jcenter()
}
tasks.withType(JavaCompile) {
//I don't believe those warnings add value given modern IDEs
options.warnings = false
options.encoding = 'UTF-8'
}
}
configurations {
testUtil //TODO move to separate project
}
apply from: 'gradle/root/version.gradle'
apply from: "gradle/java-library.gradle"
dependencies {
compile 'net.bytebuddy:byte-buddy:1.5.12'
compile 'net.bytebuddy:byte-buddy-agent:1.5.12'
provided "junit:junit:4.12", "org.hamcrest:hamcrest-core:1.3"
compile "org.objenesis:objenesis:2.5"
testCompile 'org.ow2.asm:asm:5.1'
testCompile 'org.assertj:assertj-core:3.5.2'
testRuntime configurations.provided
testUtil sourceSets.test.output
}
//need to declare dependencies before applying publishable java library
//otherwise the pom file is incorrect
apply from: "gradle/publishable-java-library.gradle"
apply from: 'gradle/root/ide.gradle'
apply from: 'gradle/root/coverage.gradle'
apply from: 'gradle/root/gradle-fix.gradle'
apply from: 'gradle/root/release.gradle'
apply from: 'gradle/mockito-core/inline-mock.gradle'
apply from: 'gradle/mockito-core/osgi.gradle'
apply from: 'gradle/mockito-core/javadoc.gradle'
apply from: 'gradle/mockito-core/license.gradle'
apply from: 'gradle/mockito-core/testing.gradle'
task wrapper(type: Wrapper) {
gradleVersion = '3.1'
}
task ciBuild {
//validate the state of the project
dependsOn { allprojects*.build }
dependsOn tasks.idea, tasks.eclipse
}
release.mustRunAfter ciBuild //Making sure that release task is only invoked after the entire ciBuild validation
//Posting Build scans to https://scans.gradle.com
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
recipes 'git-commit', 'travis-ci'
}