Skip to content

Commit

Permalink
Fix the project isolation issues
Browse files Browse the repository at this point in the history
With the new project isolation feature in Gradle there are restrictions
on what you can access on a `Project` instance for another module.
  • Loading branch information
ansman committed Sep 4, 2024
1 parent 76cfb4e commit 23a80e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import org.gradle.api.logging.Logger
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.findByType
import org.gradle.kotlin.dsl.withType
import org.gradle.util.GradleVersion

/**
* Validates required dependencies. If GPP can't run in the current context, an error will be
* thrown.
*/
fun Project.validateRuntime() {
rootProject.plugins.apply(RuntimeValidationPlugin::class)

project.plugins.withType<AppPlugin> {
GradleRuntimeValidator(GradleVersion.current(), MIN_GRADLE_VERSION).validate()
plugins.withType<AppPlugin> {
val agpPluginVersion = extensions.findByType<ApplicationAndroidComponentsExtension>()?.pluginVersion
AgpRuntimeValidator(agpPluginVersion, MIN_AGP_VERSION).validate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ internal abstract class PlayPublisherPlugin @Inject constructor(
}

private fun applyInternal(project: Project) {
val executionDir = project.rootProject.layout.projectDirectory
val executionDir = project.rootDir
val cliOptionsExtension = project.objects.newInstance<CliPlayPublisherExtension>()
val bootstrapOptionsHolder = BootstrapOptions.Holder()

Expand Down

0 comments on commit 23a80e1

Please sign in to comment.