File tree Expand file tree Collapse file tree 4 files changed +22
-19
lines changed
dropbox-sdk-android/src/main/java/com/dropbox/core/android/internal
src/main/java/com/dropbox/core Expand file tree Collapse file tree 4 files changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package com.dropbox.core.android.internal
33import android.content.Context
44import android.content.Intent
55import android.content.pm.PackageInfo
6- import android.content.pm.PackageManager
76import com.dropbox.core.DbxSdkVersion
87import com.dropbox.core.android.AuthActivity
98
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ public abstract class com/dropbox/core/DbxRequestUtil$ResponseHandler {
206206 public abstract fun handle (Lcom/dropbox/core/http/HttpRequestor$Response;)Ljava/lang/Object;
207207}
208208
209- public class com/dropbox/core/DbxSdkVersion {
209+ public final class com/dropbox/core/DbxSdkVersion {
210210 public static final field Version Ljava/lang/String;
211211 public fun <init> ()V
212212}
Original file line number Diff line number Diff line change @@ -27,11 +27,32 @@ ext {
2727 authInfoPropertyName = ' com.dropbox.test.authInfoFile'
2828}
2929
30+ tasks. register(' versionWriterTask' ) {
31+ def versionName = project. property(" VERSION_NAME" )
32+ it. inputs. property(" versionName" , versionName)
33+
34+ def generatedDir = project. layout. buildDirectory. dir(" generated/version" )
35+ it. outputs. dir(generatedDir)
36+
37+ it. doLast {
38+ def versionFile = generatedDir. get(). file(" com/dropbox/core/DbxSdkVersion.java" ). asFile
39+ versionFile. parentFile. mkdirs()
40+ versionFile. text = """ // Generated file. Do not edit
41+ package com.dropbox.core;
42+
43+ public final class DbxSdkVersion {
44+ public static final String Version = "${ versionName} ";
45+ }
46+ """
47+ }
48+ }
49+
3050sourceSets {
3151 main {
3252 java {
3353 // Including the Android Code this way until it is later released as a separate artifact
3454 srcDir ' ../dropbox-sdk-android/src/main/java'
55+ srcDir(versionWriterTask)
3556 }
3657 }
3758}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments