Skip to content

Commit

Permalink
Resolve ml-cpp snapshot when building ES non release as included build
Browse files Browse the repository at this point in the history
  • Loading branch information
breskeby committed Sep 29, 2023
1 parent 8fd2a49 commit fa319f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions x-pack/plugin/ml/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.elasticsearch.gradle.internal.info.BuildParams

apply plugin: 'elasticsearch.internal-es-plugin'
apply plugin: 'elasticsearch.internal-cluster-test'
apply plugin: 'elasticsearch.internal-test-artifact'
Expand Down Expand Up @@ -78,15 +80,20 @@ dependencies {
api "org.apache.lucene:lucene-analysis-icu:${versions.lucene}"
api "org.apache.lucene:lucene-analysis-kuromoji:${versions.lucene}"
implementation 'org.ojalgo:ojalgo:51.2.0'
nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}:deps@zip") {
nativeBundle("org.elasticsearch.ml:ml-cpp:${mlCppVersion()}:deps@zip") {
changing = true
}
nativeBundle("org.elasticsearch.ml:ml-cpp:${project.version}:nodeps@zip") {
nativeBundle("org.elasticsearch.ml:ml-cpp:${mlCppVersion()}:nodeps@zip") {
changing = true
}
testImplementation 'org.ini4j:ini4j:0.5.2'
}

def mlCppVersion(){
return (project.gradle.parent != null && BuildParams.isSnapshotBuild() == false) ?
(project.version + "-SNAPSHOT") : project.version;
}

artifacts {
// normal es plugins do not publish the jar but we need to since users need it for extensions
archives tasks.named("jar")
Expand Down

0 comments on commit fa319f4

Please sign in to comment.