forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add groupId value propagation tests for ZIP publication task (opensea…
…rch-project#4772) The groupId can be defined on several levels. This commit adds more tests to cover the "edge" cases. - In one case the groupId is inherited from the top most 'allprojects' section (and thus can be missing in the publications section). - The other case is opposite, it tests that if the groupId is defined on several levels then the most internal level outweighs the other levels. Closes: opensearch-project#4771 Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io> Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
- Loading branch information
1 parent
be59b0e
commit 52cca52
Showing
4 changed files
with
129 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
buildSrc/src/test/resources/pluginzip/allProjectsGroup.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
plugins { | ||
id 'java-gradle-plugin' | ||
id 'opensearch.pluginzip' | ||
} | ||
|
||
version='2.0.0.0' | ||
|
||
// A bundlePlugin task mockup | ||
tasks.register('bundlePlugin', Zip.class) { | ||
archiveFileName = "sample-plugin-${version}.zip" | ||
destinationDirectory = layout.buildDirectory.dir('distributions') | ||
from layout.projectDirectory.file('sample-plugin-source.txt') | ||
} | ||
|
||
allprojects { | ||
group = 'org.opensearch' | ||
} | ||
|
||
publishing { | ||
publications { | ||
pluginZip(MavenPublication) { publication -> | ||
pom { | ||
name = "sample-plugin" | ||
description = "pluginDescription" | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
buildSrc/src/test/resources/pluginzip/groupPriorityLevel.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
plugins { | ||
id 'java-gradle-plugin' | ||
id 'opensearch.pluginzip' | ||
} | ||
|
||
version='2.0.0.0' | ||
|
||
// A bundlePlugin task mockup | ||
tasks.register('bundlePlugin', Zip.class) { | ||
archiveFileName = "sample-plugin-${version}.zip" | ||
destinationDirectory = layout.buildDirectory.dir('distributions') | ||
from layout.projectDirectory.file('sample-plugin-source.txt') | ||
} | ||
|
||
allprojects { | ||
group = 'level.1' | ||
} | ||
|
||
publishing { | ||
publications { | ||
pluginZip(MavenPublication) { publication -> | ||
groupId = "level.2" | ||
pom { | ||
name = "sample-plugin" | ||
description = "pluginDescription" | ||
groupId = "level.3" | ||
} | ||
} | ||
} | ||
} |