Skip to content

Commit

Permalink
Fix gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Jan 27, 2022
1 parent f00eea8 commit fe6307d
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ version = "${plugin_version}"
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'elasticsearch.esplugin'
apply plugin: 'elasticsearch.yaml-rest-test'

// license of this project
//licenseFile = rootProject.file('LICENSE')
Expand All @@ -36,19 +37,32 @@ esplugin {
dependencies {
implementation "org.elasticsearch:elasticsearch:${es_version}"

implementation files('libs/legacy-geo-7.16.3.jar')
implementation files('libs/jts-core-1.15.0.jar')
implementation files('libs/spatial4j-0.7.jar')
implementation files('lucene-spatial-extras-8.10.1.jar')
}

// We ship the legacy geo archive with sources,
// because the compilation stage needs to resolve symbols
// However this archive is not included in the final plugin bundle, since
// legacy geo and its dependencies (JTS) are already present at runtime
// with ES (see the jar/manifest rule below)
compileOnly files('libs/legacy-geo-7.16.3.jar')

// Skip license headers check
//licenseHeaders.enabled = false
yamlRestTestImplementation "org.elasticsearch.test:framework:${es_version}"
yamlRestTestImplementation "org.apache.logging.log4j:log4j-core:2.17.1"
}

// Use elasticsearch checkstyle rules
//checkstyleTest.enabled = true
// Since this plugin is meant to be loaded in an ES 7.16 instance,
// we can "link" it to existing classes through a class path without adding other archives
// to the plugin bundle
jar {
manifest {
attributes(
"Class-Path": "../../modules/legacy-geo/legacy-geo-7.16.3.jar ../../modules/legacy-geo/jts-core-1.15.0.jar ../../modules/legacy-geo/spatial4j-0.7.jar")

//dependencyLicenses.enabled = true
}
}

//thirdPartyAudit.enabled = true
// Make sure the ES distribution used for rest tests is the "complete" variant
// Otherwise weirds errors occur (like the geo_shape type is not handled)
testClusters.configureEach {
testDistribution = 'DEFAULT'
// disable security to disable failing warnings
setting 'xpack.security.enabled', 'false'
}

0 comments on commit fe6307d

Please sign in to comment.