@@ -2,13 +2,16 @@ package pl.allegro.tech.build.axion.release
2
2
3
3
import org.gradle.api.Plugin
4
4
import org.gradle.api.Project
5
+ import org.gradle.api.invocation.Gradle
5
6
import org.gradle.api.provider.Provider
6
7
import pl.allegro.tech.build.axion.release.domain.SnapshotDependenciesChecker
7
8
import pl.allegro.tech.build.axion.release.domain.VersionConfig
8
9
import pl.allegro.tech.build.axion.release.infrastructure.di.VersionResolutionContext
9
10
import pl.allegro.tech.build.axion.release.infrastructure.github.GithubService
10
11
import pl.allegro.tech.build.axion.release.util.FileLoader
11
12
13
+ import java.util.stream.Stream
14
+
12
15
abstract class ReleasePlugin implements Plugin<Project > {
13
16
14
17
public static final String VERSION_EXTENSION = ' scmVersion'
@@ -26,7 +29,10 @@ abstract class ReleasePlugin implements Plugin<Project> {
26
29
Provider<GithubService > githubService = project. gradle. sharedServices
27
30
.registerIfAbsent(" github" , GithubService ) {}
28
31
29
- VersionConfig versionConfig = project. extensions. create(VERSION_EXTENSION , VersionConfig , project. rootProject. layout. projectDirectory)
32
+ Gradle rootGradle = project. gradle
33
+ while (rootGradle. parent != null ) { rootGradle = rootGradle. parent }
34
+
35
+ VersionConfig versionConfig = project. extensions. create(VERSION_EXTENSION , VersionConfig , rootGradle. rootProject. layout. projectDirectory)
30
36
31
37
project. tasks. withType(BaseAxionTask ). configureEach({
32
38
it. versionConfig = versionConfig
0 commit comments