From 4bcb165a3b5e873816a911fd040f9ced860dc815 Mon Sep 17 00:00:00 2001 From: Tony Robalik Date: Wed, 23 Oct 2024 17:50:33 -0700 Subject: [PATCH] fix: revert usage of buildTreePath. --- .../kotlin/com/autonomousapps/subplugin/ProjectPlugin.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/main/kotlin/com/autonomousapps/subplugin/ProjectPlugin.kt b/src/main/kotlin/com/autonomousapps/subplugin/ProjectPlugin.kt index 1dc32727c..386952c60 100644 --- a/src/main/kotlin/com/autonomousapps/subplugin/ProjectPlugin.kt +++ b/src/main/kotlin/com/autonomousapps/subplugin/ProjectPlugin.kt @@ -15,7 +15,6 @@ import com.autonomousapps.Flags.projectPathRegex import com.autonomousapps.Flags.shouldAnalyzeTests import com.autonomousapps.internal.* import com.autonomousapps.internal.GradleVersions.isAtLeastGradle82 -import com.autonomousapps.internal.GradleVersions.isAtLeastGradle83 import com.autonomousapps.internal.advice.DslKind import com.autonomousapps.internal.analyzer.* import com.autonomousapps.internal.android.AgpVersion @@ -1041,12 +1040,6 @@ internal class ProjectPlugin(private val project: Project) { /** Get the buildPath of the current build from the root component of the resolution result. */ private fun Project.buildPath(configuration: String): Provider { - // TODO: does this violate IP? Just trying to find a simpler version than the code below. - if (isAtLeastGradle83) { - val buildTreePath = rootProject.buildTreePath - return provider { buildTreePath } - } - return configurations[configuration].incoming.resolutionResult.let { if (isAtLeastGradle82) { it.rootComponent.map { root -> (root.id as ProjectComponentIdentifier).build.buildPath }