diff --git a/android/build.gradle b/android/build.gradle index 75c614c75..7d5fc6314 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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() diff --git a/core/build.gradle b/core/build.gradle index 9b1e29cbd..9c9c2c92f 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -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") diff --git a/stone-java-gradle-plugin/src/main/kotlin/com/dropbox/stone/java/StoneTask.kt b/stone-java-gradle-plugin/src/main/kotlin/com/dropbox/stone/java/StoneTask.kt index 0e01eaf7d..89c5a6c5f 100644 --- a/stone-java-gradle-plugin/src/main/kotlin/com/dropbox/stone/java/StoneTask.kt +++ b/stone-java-gradle-plugin/src/main/kotlin/com/dropbox/stone/java/StoneTask.kt @@ -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 @@ -26,16 +22,20 @@ abstract class StoneTask : DefaultTask() { abstract val stoneConfigs: ListProperty @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