-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Fix projects that failed to build within Intellij #62258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
eabcb42
933852c
b0b5b36
e71f397
a273b94
0c952a0
6760bfa
e6b3090
87c2493
d2aceef
61f288d
54b3373
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,26 +7,23 @@ apply plugin: 'elasticsearch.validate-rest-spec' | |
archivesBaseName = 'x-pack' | ||
|
||
dependencies { | ||
yamlRestTestImplementation project(xpackModule('core')) // this redundant dependency is here to make IntelliJ happy | ||
yamlRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
testImplementation project(xpackModule('core')) | ||
testImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
javaRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
// let the yamlRestTest see the classpath of test | ||
yamlRestTestImplementation project.sourceSets.test.runtimeClasspath | ||
} | ||
|
||
configurations { | ||
testArtifacts.extendsFrom testRuntime | ||
testArtifacts.extendsFrom testImplementation | ||
testArtifacts.extendsFrom yamlRestTestImplementation | ||
testArtifacts.extendsFrom javaRestTestImplementation | ||
} | ||
|
||
restResources { | ||
restApi { | ||
includeCore '*' | ||
includeXpack '*' | ||
} | ||
restTests { | ||
includeXpack '*' | ||
} | ||
} | ||
|
||
//The api and tests need to stay at src/test/... since some external tooling depends on that exact file path. | ||
|
@@ -37,10 +34,8 @@ artifacts { | |
|
||
def testJar = tasks.register("testJar", Jar) { | ||
appendix 'test' | ||
duplicatesStrategy = DuplicatesStrategy.INCLUDE | ||
from sourceSets.test.output | ||
from sourceSets.yamlRestTest.output | ||
from sourceSets.javaRestTest.output | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am pretty sure the only reason we expose this is for the yaml tests and the custom parent runner, both of which are (now) in the test source set...so only expose that in the jar and testArtifact config. |
||
|
||
/* | ||
* Stick the license and notice file in the jar. This isn't strictly | ||
* needed because we don't publish it but it makes our super-paranoid | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
apply plugin: 'elasticsearch.yaml-rest-test' | ||
|
||
dependencies { | ||
yamlRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
yamlRestTestImplementation project(path: xpackModule('core')) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. wierd dependency ordering thing...likely a subtle in Intellij |
||
yamlRestTestImplementation project(path: xpackModule('core'), configuration: 'testArtifacts') | ||
yamlRestTestImplementation project(path: xpackProject('plugin').path, configuration: 'testArtifacts') | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't seem to have any functional impact, just noticed I missed this before and I think it is a bit more correct.