File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/main/kotlin/io/github/sgtsilvio/gradle/structure Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ class StructurePlugin : Plugin<Settings> {
30
30
projectPathMapping : ProjectPathMapping ,
31
31
rootDirectory : File ,
32
32
) {
33
- val currentProjectShortPath = startParameter.currentDir.relativeToOrNull(rootDirectory)?.let { directoryPath ->
34
- projectPathMapping.mapDirectoryToShort(directoryPath .path)
33
+ val currentProjectShortPath = startParameter.currentDir.relativeToOrNull(rootDirectory)?.let { directory ->
34
+ projectPathMapping.mapDirectoryToShort(directory .path)
35
35
}
36
36
mapTaskPaths(
37
37
startParameter.taskNames,
Original file line number Diff line number Diff line change @@ -10,10 +10,11 @@ import javax.inject.Inject
10
10
@NonExtensible
11
11
abstract class StructureProjectExtension @Inject internal constructor(
12
12
private val projectPathMapping : ProjectPathMapping ,
13
- private val project : Project ,
13
+ project : Project ,
14
14
) {
15
15
16
- fun path (shortPath : String ) =
17
- projectPathMapping.mapShortToFull(shortPath, projectPathMapping.mapGradleToShort(project.path))
18
- ? : throw IllegalArgumentException (" '$shortPath ' is not a project path" )
16
+ private val currentProjectShortPath = projectPathMapping.mapGradleToShort(project.path)
17
+
18
+ fun path (shortPath : String ) = projectPathMapping.mapShortToFull(shortPath, currentProjectShortPath)
19
+ ? : throw IllegalArgumentException (" '$shortPath ' is not a project path" )
19
20
}
You can’t perform that action at this time.
0 commit comments