Skip to content

Commit 4166b4b

Browse files
committed
fix: replace deprecated dependencyProject.path with .path
1 parent d980ddf commit 4166b4b

3 files changed

Lines changed: 10 additions & 34 deletions

File tree

build.gradle.kts

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ val platformProjects by extra {
4444
setOf(
4545
projects.src.bom,
4646
projects.src.bomThirdparty,
47-
).mapTo(mutableSetOf()) { it.dependencyProject }
47+
).mapTo(mutableSetOf()) { it.path }
4848
}
4949

5050
val notPublishedProjects by extra {
@@ -62,35 +62,11 @@ val notPublishedProjects by extra {
6262
projects.src.testkit,
6363
projects.src.testkitWiremock,
6464
projects.src.testServices,
65-
).mapTo(mutableSetOf()) { it.dependencyProject }
65+
).mapTo(mutableSetOf()) { it.path }
6666
}
6767

6868
val publishedProjects by extra {
69-
allprojects - notPublishedProjects
70-
}
71-
72-
notPublishedProjects.forEach { project ->
73-
if (project != rootProject) {
74-
project.plugins.withId("maven-publish") {
75-
throw IllegalStateException(
76-
"Project ${project.path} is listed in notPublishedProjects, however it has maven-publish plugin applied. " +
77-
"Please remove maven-publish plugin (e.g. replace build-logic.jvm-published-library with build-logic.jvm-library) or " +
78-
"move the project to the list of published ones"
79-
)
80-
}
81-
}
82-
}
83-
84-
publishedProjects.forEach {project ->
85-
project.afterEvaluate {
86-
if (!pluginManager.hasPlugin("maven-publish")) {
87-
throw IllegalStateException(
88-
"Project ${project.path} is listed in publishedProjects, however it misses maven-publish plugin. " +
89-
"Please add maven-publish plugin (e.g. replace build-logic.jvm-library with build-logic.jvm-published-library) or " +
90-
"move the project to the list of notPublishedProjects"
91-
)
92-
}
93-
}
69+
allprojects.mapTo(mutableSetOf()) { it.path } - notPublishedProjects
9470
}
9571

9672
val displayVersion by extra {
@@ -116,7 +92,7 @@ tasks.validateBeforeBuildingReleaseArtifacts {
11692
}
11793

11894
releaseArtifacts {
119-
fromProject(projects.src.dist.dependencyProject.path)
95+
fromProject(projects.src.dist.path)
12096
previewSite {
12197
into("rat")
12298
from(tasks.rat) {

src/bom/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ description = "A platform that aligns versions of all JMeter components"
2323

2424
dependencies {
2525
constraints {
26-
val publishedProjects: Set<Project> by rootProject.extra
27-
val platformProjects: Set<Project> by rootProject.extra
26+
val publishedProjects: Set<String> by rootProject.extra
27+
val platformProjects: Set<String> by rootProject.extra
2828
(publishedProjects - platformProjects).forEach {
29-
api(it)
29+
api(project(it))
3030
}
3131
}
3232
}

src/dist/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ val populateLibs by tasks.registering {
128128
doLast {
129129
val deps = configurations.runtimeClasspath.get().resolvedConfiguration.resolvedArtifacts
130130
// This ensures project exists, if project is renamed, names should be corrected here as wells
131-
val launcherProject = projects.src.launcher.dependencyProject.path
132-
val bshclientProject = projects.src.bshclient.dependencyProject.path
133-
val jorphanProject = projects.src.jorphan.dependencyProject.path
131+
val launcherProject = projects.src.launcher.path
132+
val bshclientProject = projects.src.bshclient.path
133+
val jorphanProject = projects.src.jorphan.path
134134
listOf(libs, libsExt, binLibs).forEach {
135135
it.filePermissions {
136136
unix("rw-r--r--")

0 commit comments

Comments
 (0)