Skip to content

Commit

Permalink
enable trackSourceFiles by default
Browse files Browse the repository at this point in the history
  • Loading branch information
RBusarow committed Dec 6, 2024
1 parent 285f2bb commit 311a68c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,17 +323,17 @@ Anvil will automatically set `correctErrorTypes` to false to avoid this issue.
#### Incremental Kotlin compilation breaks Anvil's feature to merge contributions

> [!TIP]
> Anvil now experimentally supports incremental compilation and Gradle's build caching,
> Anvil now supports incremental compilation and Gradle's build caching,
> as of [v2.5.0](https://github.com/square/anvil/releases/tag/v2.5.0-beta01).
>
> This feature is disabled by default.
> It can be enabled via a Gradle property or the Gradle DSL:
> This feature is enabled by default.
> It can be disabled via a Gradle property or the Gradle DSL:
> <details open>
> <summary>Gradle Properties</summary>
>
> ```properties
> # gradle.properties
> com.squareup.anvil.trackSourceFiles=true # default is false
> com.squareup.anvil.trackSourceFiles=false # default is true
> ```
>
> </details>
Expand All @@ -343,7 +343,7 @@ Anvil will automatically set `correctErrorTypes` to false to avoid this issue.
> ```groovy
> // build.gradle
> anvil {
> trackSourceFiles = true // default is false
> trackSourceFiles = false // default is true
> }
> ```
> </details>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CommandLineOptions private constructor(
generateFactories = get(generateDaggerFactoriesKey, false),
generateFactoriesOnly = get(generateDaggerFactoriesOnlyKey, false),
disableComponentMerging = get(disableComponentMergingKey, false),
trackSourceFiles = get(trackSourceFilesKey, false),
trackSourceFiles = get(trackSourceFilesKey, true),
willHaveDaggerFactories = get(willHaveDaggerFactoriesKey, false),
backend = parseBackend(),
componentMergingBackend = parseComponentMergingBackend(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AnvilExtensionTest : BaseGradleTest() {
kase(a1 = "disableComponentMerging", false),
kase(a1 = "syncGeneratedSources", false),
kase(a1 = "addOptionalAnnotations", false),
kase(a1 = "trackSourceFiles", false),
kase(a1 = "trackSourceFiles", true),
)

fun GradleProjectBuilder.gradlePropertiesFile(propertyName: String, value: Any) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public abstract class AnvilExtension @Inject constructor(
* - Generated code is cached in a way that Gradle understands,
* and will be restored from cache along with other build artifacts.
*
* This feature is disabled by default.
* This feature is enabled by default.
*
* This property can also be set via a Gradle property:
*
Expand All @@ -119,7 +119,7 @@ public abstract class AnvilExtension @Inject constructor(
* ```
*/
public val trackSourceFiles: Property<Boolean> = objects.property(Boolean::class.java)
.conventionFromProperty("com.squareup.anvil.trackSourceFiles", false)
.conventionFromProperty("com.squareup.anvil.trackSourceFiles", true)

@Suppress("PropertyName")
internal var _variantFilter: Action<VariantFilter>? = null
Expand Down

0 comments on commit 311a68c

Please sign in to comment.