File tree Expand file tree Collapse file tree 9 files changed +45
-5
lines changed
src/main/kotlin/io/sentry/android/gradle Expand file tree Collapse file tree 9 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
5
+ ### Fixes
6
+
7
+ - Enable caching for BundleSourcesTask ([ #894 ] ( https://github.com/getsentry/sentry-android-gradle-plugin/pull/894 )
8
+
5
9
### Dependencies
6
10
7
11
- Bump Android SDK from v8.12.0 to v8.13.2 ([ #896 ] ( https://github.com/getsentry/sentry-android-gradle-plugin/pull/896 ) )
Original file line number Diff line number Diff line change @@ -319,3 +319,10 @@ buildConfig {
319
319
}
320
320
321
321
tasks.register<ASMifyTask >(" asmify" )
322
+
323
+ tasks.named(" check" ).configure { dependsOn(tasks.named(" validatePlugins" )) }
324
+
325
+ tasks.withType<ValidatePlugins >().configureEach {
326
+ failOnWarning.set(true )
327
+ enableStricterValidation.set(true )
328
+ }
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import org.gradle.api.file.DirectoryProperty
17
17
import org.gradle.api.file.RegularFileProperty
18
18
import org.gradle.api.provider.Property
19
19
import org.gradle.api.provider.Provider
20
+ import org.gradle.api.tasks.CacheableTask
20
21
import org.gradle.api.tasks.Input
21
22
import org.gradle.api.tasks.InputDirectory
22
23
import org.gradle.api.tasks.InputFile
@@ -25,6 +26,7 @@ import org.gradle.api.tasks.PathSensitive
25
26
import org.gradle.api.tasks.PathSensitivity
26
27
import org.gradle.api.tasks.TaskProvider
27
28
29
+ @CacheableTask
28
30
abstract class BundleSourcesTask : SentryCliExecTask () {
29
31
30
32
init {
@@ -41,7 +43,9 @@ abstract class BundleSourcesTask : SentryCliExecTask() {
41
43
@get:InputDirectory
42
44
abstract val sourceDir: DirectoryProperty
43
45
44
- @get:InputFile abstract val bundleIdFile: RegularFileProperty
46
+ @get:InputFile
47
+ @get:PathSensitive(PathSensitivity .NONE )
48
+ abstract val bundleIdFile: RegularFileProperty
45
49
46
50
@get:OutputDirectory abstract val output: DirectoryProperty
47
51
Original file line number Diff line number Diff line change @@ -15,8 +15,12 @@ import org.gradle.api.provider.Property
15
15
import org.gradle.api.provider.Provider
16
16
import org.gradle.api.tasks.Input
17
17
import org.gradle.api.tasks.InputDirectory
18
+ import org.gradle.api.tasks.PathSensitive
19
+ import org.gradle.api.tasks.PathSensitivity
18
20
import org.gradle.api.tasks.TaskProvider
21
+ import org.gradle.work.DisableCachingByDefault
19
22
23
+ @DisableCachingByDefault(because = " Uploads should not be cached" )
20
24
abstract class UploadSourceBundleTask : SentryCliExecTask () {
21
25
22
26
init {
@@ -38,7 +42,9 @@ abstract class UploadSourceBundleTask : SentryCliExecTask() {
38
42
39
43
@get:Input abstract val includeSourceContext: Property <Boolean >
40
44
41
- @get:InputDirectory abstract val sourceBundleDir: DirectoryProperty
45
+ @get:InputDirectory
46
+ @get:PathSensitive(PathSensitivity .RELATIVE )
47
+ abstract val sourceBundleDir: DirectoryProperty
42
48
43
49
@get:Input abstract val autoUploadSourceContext: Property <Boolean >
44
50
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package io.sentry.android.gradle.tasks
3
3
import org.gradle.api.DefaultTask
4
4
import org.gradle.api.file.DirectoryProperty
5
5
import org.gradle.api.tasks.OutputDirectory
6
+ import org.gradle.work.DisableCachingByDefault
6
7
8
+ @DisableCachingByDefault(because = " abstract task, should not be used directly" )
7
9
abstract class DirectoryOutputTask : DefaultTask () {
8
10
9
11
@get:OutputDirectory abstract val output: DirectoryProperty
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package io.sentry.android.gradle.tasks
3
3
import org.gradle.api.file.RegularFile
4
4
import org.gradle.api.provider.Provider
5
5
import org.gradle.api.tasks.Internal
6
+ import org.gradle.work.DisableCachingByDefault
6
7
8
+ @DisableCachingByDefault(because = " abstract task, should not be used directly" )
7
9
abstract class PropertiesFileOutputTask : DirectoryOutputTask () {
8
10
@get:Internal abstract val outputFile: Provider <RegularFile >
9
11
}
Original file line number Diff line number Diff line change @@ -13,14 +13,21 @@ import org.gradle.api.tasks.Input
13
13
import org.gradle.api.tasks.InputFile
14
14
import org.gradle.api.tasks.Internal
15
15
import org.gradle.api.tasks.Optional
16
+ import org.gradle.api.tasks.PathSensitive
17
+ import org.gradle.api.tasks.PathSensitivity
18
+ import org.gradle.work.DisableCachingByDefault
16
19
20
+ @DisableCachingByDefault(because = " abstract task, should not be used directly" )
17
21
abstract class SentryCliExecTask : Exec () {
18
22
19
23
@get:Input @get:Optional abstract val debug: Property <Boolean >
20
24
21
25
@get:Input abstract val cliExecutable: Property <String >
22
26
23
- @get:InputFile @get:Optional abstract val sentryProperties: RegularFileProperty
27
+ @get:InputFile
28
+ @get:Optional
29
+ @get:PathSensitive(PathSensitivity .RELATIVE )
30
+ abstract val sentryProperties: RegularFileProperty
24
31
25
32
@get:Input @get:Optional abstract val sentryOrganization: Property <String >
26
33
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ import org.gradle.api.provider.Provider
16
16
import org.gradle.api.tasks.Input
17
17
import org.gradle.api.tasks.Internal
18
18
import org.gradle.api.tasks.TaskProvider
19
+ import org.gradle.work.DisableCachingByDefault
19
20
21
+ @DisableCachingByDefault(because = " Uploads should not be cached" )
20
22
abstract class SentryUploadNativeSymbolsTask : SentryCliExecTask () {
21
23
22
24
init {
Original file line number Diff line number Diff line change @@ -16,8 +16,12 @@ import org.gradle.api.provider.Provider
16
16
import org.gradle.api.tasks.Input
17
17
import org.gradle.api.tasks.InputFile
18
18
import org.gradle.api.tasks.InputFiles
19
+ import org.gradle.api.tasks.PathSensitive
20
+ import org.gradle.api.tasks.PathSensitivity
19
21
import org.gradle.api.tasks.TaskProvider
22
+ import org.gradle.work.DisableCachingByDefault
20
23
24
+ @DisableCachingByDefault(because = " Uploads should not be cached" )
21
25
abstract class SentryUploadProguardMappingsTask : SentryCliExecTask () {
22
26
23
27
init {
@@ -33,9 +37,11 @@ abstract class SentryUploadProguardMappingsTask : SentryCliExecTask() {
33
37
outputs.upToDateWhen { true }
34
38
}
35
39
36
- @get:InputFile abstract val uuidFile: RegularFileProperty
40
+ @get:InputFile @get:PathSensitive( PathSensitivity . NONE ) abstract val uuidFile: RegularFileProperty
37
41
38
- @get:InputFiles abstract var mappingsFiles: Provider <FileCollection >
42
+ @get:InputFiles
43
+ @get:PathSensitive(PathSensitivity .RELATIVE )
44
+ abstract var mappingsFiles: Provider <FileCollection >
39
45
40
46
@get:Input abstract val autoUploadProguardMapping: Property <Boolean >
41
47
You can’t perform that action at this time.
0 commit comments