buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } jcenter() } dependencies { // run with Java 11 and ./gradlew --no-daemon clean jmh classpath "me.champeau.gradle:jmh-gradle-plugin:0.5.2" } } plugins { // usage: gradle dependencyUpdates -Drevision=release id "com.github.ben-manes.versions" version "0.34.0" } apply plugin: 'java' apply plugin: 'eclipse' // java compatibility version sourceCompatibility = 11 /* * The shared configuration for all sub-projects: */ subprojects { apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'maven' apply plugin: 'maven-publish' apply plugin: 'me.champeau.gradle.jmh' // java compatibility version sourceCompatibility = 11 configurations { tests } // the repositories for external depenencies repositories { mavenCentral() jcenter() } uploadArchives { repositories { mavenDeployer { if (!project.hasProperty('mavenDeployRepo')){ throw new IllegalStateException("Set the property 'mavenDeployRepo' to the repository URL. A good place is ~/.gradle/gradle.properties") } repository(url: "${mavenDeployRepo}") println "publishing to: ${mavenDeployRepo}" } } } task sourcesJar(type: Jar, dependsOn: classes) { classifier 'sources' from sourceSets.main.allSource } artifacts { archives sourcesJar } // dependencies that all sub-projects have dependencies { testCompile 'org.junit.jupiter:junit-jupiter-api:5.7.0' testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.7.0' testRuntime 'org.junit.platform:junit-platform-launcher:1.7.0' // needed by eclipse } test { useJUnitPlatform() } jmh { //jvmArgsAppend = "" resultFormat = "JSON" include = ['.*BenchmarkMultiwayMerge.*'] // include pattern (regular expression) for benchmarks to be executed //exclude = ['some regular expression'] // exclude pattern (regular expression) for benchmarks to be executed } } wrapper { gradleVersion = '6.7' }