Skip to content

Commit

Permalink
Enable Gradle build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Sep 22, 2024
1 parent 9c852a5 commit 7be5a8b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,13 @@ sourceSets.main {
// generation is deterministic
// Note: This is a separate task to not cause model generation task to fail, which would require regenerating
// models a second time when checksum becomes outdated
val checkLanguageModelsChecksum by tasks.registering {
val checkLanguageModelsChecksum: TaskProvider<Task> by tasks.registering {
onlyIf {
// Note that `didWork` might be deprecated in the future, see https://github.com/gradle/gradle/issues/23460
// have to check the 'up-to-date' status then?
createLanguageModels.get().didWork
}

doLast {
val messageDigest = MessageDigest.getInstance("SHA-256")
val startDir = modelOutputDir_.get().asFile.toPath()
Expand Down
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ org.gradle.parallel=true
# for error-free compilation and testing on Windows
org.gradle.jvmargs='-Dfile.encoding=UTF-8'

# enable Gradle build cache
org.gradle.caching=true


### Project specific properties ###

linguaTaskGroup=Lingua-specific

linguaGroupId=com.github.marcono1234
Expand Down

0 comments on commit 7be5a8b

Please sign in to comment.