summaryrefslogtreecommitdiff
path: root/wallet/build.gradle
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-04-10 14:22:22 -0300
committerTorsten Grote <t@grobox.de>2020-04-10 14:22:22 -0300
commit1552f14105ecd9e23ed7abe0bb6737a580b97c2a (patch)
tree814e16000a563fef445fb7f94e19f14db28e9951 /wallet/build.gradle
parent20b1d2677462090a08edda99d042dbcddc9f8c11 (diff)
downloadtaler-android-1552f14105ecd9e23ed7abe0bb6737a580b97c2a.tar.gz
taler-android-1552f14105ecd9e23ed7abe0bb6737a580b97c2a.tar.bz2
taler-android-1552f14105ecd9e23ed7abe0bb6737a580b97c2a.zip
[wallet] move wallet-core library download into gradle task
This removes the last dependency that had to be manually copied.
Diffstat (limited to 'wallet/build.gradle')
-rw-r--r--wallet/build.gradle26
1 files changed, 23 insertions, 3 deletions
diff --git a/wallet/build.gradle b/wallet/build.gradle
index 3f9047e..0a4ad69 100644
--- a/wallet/build.gradle
+++ b/wallet/build.gradle
@@ -14,9 +14,14 @@
* GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'kotlin-android-extensions'
+import com.android.build.gradle.tasks.MergeResources
+
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ id "kotlin-android-extensions"
+ id "de.undercouch.download"
+}
android {
compileSdkVersion 29
@@ -84,3 +89,18 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
+
+def walletLibraryDir = 'src/main/assets'
+def walletLibraryFile = walletLibraryDir + '/taler-wallet-android.js'
+task downloadWalletLibrary(type: Download) {
+ src "https://git.taler.net/wallet-android.git/plain/taler-wallet-android.js?h=binary-deps"
+ dest walletLibraryFile
+ onlyIfModified true
+ doFirst {
+ new File(walletLibraryDir).mkdirs()
+ }
+}
+tasks.withType(MergeResources) {
+ inputs.dir walletLibraryDir
+ dependsOn downloadWalletLibrary
+}