Skip to content

Commit

Permalink
Merge pull request #4401 from kwvanderlinde/refactor/4399-avoid-writi…
Browse files Browse the repository at this point in the history
…ng-sentry-config-to-src-dir

Replace configSentryRelease task with processResources configuration
  • Loading branch information
cwisniew authored Nov 15, 2023
2 parents 10b1345 + 23fc64c commit eab3776
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ out/
# Automatically Generated
################################################################################
package/windows/MapTool.iss
src/main/resources/sentry.properties


# IDEs
Expand Down
30 changes: 13 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -514,18 +514,18 @@ dependencies {
implementation 'com.github.RPTools:advanced-dice-roller:1.0.3'
}


task configSentryRelease(type: Copy) {
from("build-resources/sentry.properties.template")
into("src/main/resources/")
rename("sentry.properties.template", "sentry.properties")
def tokens = [
AppVersion : "${tagVersion}",
Environment: "${environment}",
SentryDSN : "${sentryDSN}"
]
expand(tokens)
inputs.properties(tokens)
processResources {
with copySpec {
from("build-resources/sentry.properties.template")
rename("sentry.properties.template", "sentry.properties")
def tokens = [
AppVersion : "${tagVersion}",
Environment: "${environment}",
SentryDSN : "${sentryDSN}"
]
expand(tokens)
inputs.properties(tokens)
}
}

shadowJar {
Expand Down Expand Up @@ -598,8 +598,4 @@ test {

task createWrapper(type: Wrapper) {
gradleVersion = '8.2.1'
}

// Configure current release tag in Sentry.io properties
processResources.dependsOn configSentryRelease
configSentryRelease.dependsOn 'spotlessCheck'
}

0 comments on commit eab3776

Please sign in to comment.