Skip to content

Commit

Permalink
Strict plugin validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Oct 11, 2024
1 parent 5eaa442 commit a6aa53f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platforms/gradle/foundry-gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ tasks.named<ProcessResources>("processResources") {

moshi { enableSealed.set(true) }

tasks.named<ValidatePlugins>("validatePlugins") { enableStricterValidation.set(true) }

// This is necessary for included builds, as the KGP plugin isn't applied in them and thus doesn't
// apply disambiguation rules
dependencies.constraints {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.TaskProvider
import org.gradle.api.tasks.UntrackedTask
import org.gradle.work.DisableCachingByDefault

private const val IGNORE_COMMENT = "// dependency-rake=ignore"

Expand All @@ -71,6 +72,7 @@ private val MANAGED_DEPENDENCIES =
* advice to the project build file. This is usually not run directly, but rather added as a
* finalizer to the `AdviceTask` it reads from.
*/
@DisableCachingByDefault
internal abstract class RakeDependencies
@Inject
constructor(objects: ObjectFactory, providers: ProviderFactory) : AbstractPostProcessingTask() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity.RELATIVE
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.TaskProvider
import org.gradle.work.DisableCachingByDefault

/**
* A task that aggregates all the androidTest apk paths and writes them (newline-delimited) to an
* [outputFile] in the format that Fladle expects.
*
* Not cacheable because this outputs absolute paths.
*/
@DisableCachingByDefault
public abstract class AndroidTestApksTask : DefaultTask() {
@get:PathSensitive(RELATIVE)
@get:InputFiles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import org.gradle.api.provider.MapProperty
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
import org.gradle.internal.component.external.model.ModuleComponentArtifactIdentifier
import org.gradle.work.DisableCachingByDefault

@DisableCachingByDefault
public abstract class BaseDependencyCheckTask : DefaultTask() {
@get:Input public abstract val identifiersToVersions: MapProperty<String, String>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.gradle.api.tasks.Input
import org.gradle.api.tasks.OutputFile
import org.gradle.api.tasks.TaskAction
import org.gradle.internal.logging.progress.ProgressLoggerFactory
import org.gradle.work.DisableCachingByDefault

/**
* Downloads a binary from its GitHub releases.
Expand All @@ -38,6 +39,7 @@ import org.gradle.internal.logging.progress.ProgressLoggerFactory
* ./gradlew <updateThing>
* ```
*/
@DisableCachingByDefault
internal abstract class BaseDownloadTask(
private val targetName: String,
private val addExecPrefix: Boolean = false,
Expand Down

0 comments on commit a6aa53f

Please sign in to comment.