From c6dadacb29416260568b1ebae37851e892d602f8 Mon Sep 17 00:00:00 2001 From: Colin Goodheart-Smithe Date: Mon, 7 Nov 2016 09:27:22 +0000 Subject: [PATCH] Changes the build to track elasticsearch 5.1.0-SNAPSHOT (elastic/elasticsearch#248) Original commit: elastic/x-pack-elasticsearch@af689298f71960b0a2abe6ccce3ee8a2cd891453 --- build.gradle | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 62dbda7d9ea..9ffde5f7a8b 100644 --- a/build.gradle +++ b/build.gradle @@ -28,19 +28,41 @@ task cpptest(type: Exec) { } subprojects { + apply plugin: 'eclipse' + apply plugin: 'idea' apply plugin: 'maven' apply plugin: 'java' + + buildscript { + repositories { + if (System.getProperty("repos.mavenlocal") != null) { + // with -Drepos.mavenlocal=true we can force checking the local .m2 repo which is useful for building against + // elasticsearch snapshots + mavenLocal() + } + mavenCentral() + maven { + name 'sonatype-snapshots' + url "https://oss.sonatype.org/content/repositories/snapshots/" + } + jcenter() + } + } - compileJava.options.encoding = 'UTF-8' - compileTestJava.options.encoding = 'UTF-8' - - group = 'com.prelert' - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + group = 'org.elasticsearch.prelert' repositories { - mavenLocal() - maven { url "http://repo.maven.apache.org/maven2" } + if (System.getProperty("repos.mavenlocal") != null) { + // with -Drepos.mavenlocal=true we can force checking the local .m2 repo which is useful for building against + // elasticsearch snapshots + mavenLocal() + } + mavenCentral() + maven { + name 'sonatype-snapshots' + url "https://oss.sonatype.org/content/repositories/snapshots/" + } + jcenter() } configurations.all { @@ -48,8 +70,6 @@ subprojects { dependencies { testCompile group: 'org.ini4j', name: 'ini4j', version:'0.5.2' - // Includes: junit, hamcrest and mockito - testCompile group: 'org.elasticsearch.test', name: 'framework', version: '5.0.0' } }