Skip to content

Commit

Permalink
Mark StoneTask as cacheable and reolve some dbapp integration issues (#…
Browse files Browse the repository at this point in the history
…515)

Co-authored-by: Walter Dziemianczyk <[email protected]>
  • Loading branch information
wdziemia and Walter Dziemianczyk authored Nov 30, 2023
1 parent 68f4dee commit 2337c07
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
7 changes: 4 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id "org.jetbrains.kotlinx.binary-compatibility-validator"
alias(dropboxJavaSdkLibs.plugins.maven.publish.plugin)
alias(dropboxJavaSdkLibs.plugins.gradle.version.plugin)
alias(dropboxJavaSdkLibs.plugins.dependency.guard)
id "com.vanniktech.maven.publish"
id "com.github.ben-manes.versions"
id "com.dropbox.dependency-guard"
}

android {
namespace = "com.dropbox.core.sdk.android"
compileSdk dropboxJavaSdkLibs.versions.android.compile.sdk.get().toInteger()
defaultConfig {
minSdk dropboxJavaSdkLibs.versions.android.min.sdk.get().toInteger()
Expand Down
7 changes: 6 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ ext {
}

tasks.register('versionWriterTask') {
def versionName = project.property("VERSION_NAME")
String versionName
if (project.hasProperty("VERSION_NAME")) {
versionName = "${project.property("VERSION_NAME")}"
} else {
versionName = project.version
}
it.inputs.property("versionName", versionName)

def generatedDir = project.layout.buildDirectory.dir("generated/version")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.ListProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputDirectory
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.*
import org.gradle.process.ExecOperations
import java.io.File
import java.io.FileOutputStream
import javax.inject.Inject

@CacheableTask
abstract class StoneTask : DefaultTask() {

@get:Inject
Expand All @@ -26,16 +22,20 @@ abstract class StoneTask : DefaultTask() {
abstract val stoneConfigs: ListProperty<StoneConfig>

@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val generatorDir: DirectoryProperty

@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val specDir: DirectoryProperty

@get:Optional
@get:InputFile
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val routeWhitelistFilter: RegularFileProperty

@get:InputDirectory
@get:PathSensitive(PathSensitivity.RELATIVE)
abstract val stoneDir: DirectoryProperty

@get:Input
Expand Down

0 comments on commit 2337c07

Please sign in to comment.