Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.dropbox.core.android.internal
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import com.dropbox.core.DbxSdkVersion
import com.dropbox.core.android.AuthActivity

Expand Down
2 changes: 1 addition & 1 deletion dropbox-sdk-java/api/dropbox-sdk-java.api
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public abstract class com/dropbox/core/DbxRequestUtil$ResponseHandler {
public abstract fun handle (Lcom/dropbox/core/http/HttpRequestor$Response;)Ljava/lang/Object;
}

public class com/dropbox/core/DbxSdkVersion {
public final class com/dropbox/core/DbxSdkVersion {
public static final field Version Ljava/lang/String;
public fun <init> ()V
}
Expand Down
21 changes: 21 additions & 0 deletions dropbox-sdk-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,32 @@ ext {
authInfoPropertyName = 'com.dropbox.test.authInfoFile'
}

tasks.register('versionWriterTask') {
def versionName = project.property("VERSION_NAME")
it.inputs.property("versionName", versionName)

def generatedDir = project.layout.buildDirectory.dir("generated/version")
it.outputs.dir(generatedDir)

it.doLast {
def versionFile = generatedDir.get().file("com/dropbox/core/DbxSdkVersion.java").asFile
versionFile.parentFile.mkdirs()
versionFile.text = """// Generated file. Do not edit
package com.dropbox.core;

public final class DbxSdkVersion {
public static final String Version = "${versionName}";
}
"""
}
}

sourceSets {
main {
java {
// Including the Android Code this way until it is later released as a separate artifact
srcDir '../dropbox-sdk-android/src/main/java'
srcDir(versionWriterTask)
}
}
}
Expand Down
17 changes: 0 additions & 17 deletions dropbox-sdk-java/src/main/java/com/dropbox/core/DbxSdkVersion.java

This file was deleted.