gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-android] branch master updated: [wallet] move wallet-core l


From: gnunet
Subject: [taler-taler-android] branch master updated: [wallet] move wallet-core library download into gradle task
Date: Fri, 10 Apr 2020 19:23:25 +0200

This is an automated email from the git hooks/post-receive script.

torsten-grote pushed a commit to branch master
in repository taler-android.

The following commit(s) were added to refs/heads/master by this push:
     new 1552f14  [wallet] move wallet-core library download into gradle task
1552f14 is described below

commit 1552f14105ecd9e23ed7abe0bb6737a580b97c2a
Author: Torsten Grote <address@hidden>
AuthorDate: Fri Apr 10 14:22:22 2020 -0300

    [wallet] move wallet-core library download into gradle task
    
    This removes the last dependency that had to be manually copied.
---
 wallet/.gitignore     |  2 +-
 wallet/.gitlab-ci.yml |  7 -------
 wallet/README.md      | 25 ++-----------------------
 wallet/build.gradle   | 26 +++++++++++++++++++++++---
 4 files changed, 26 insertions(+), 34 deletions(-)

diff --git a/wallet/.gitignore b/wallet/.gitignore
index 741e19c..85d7ef4 100644
--- a/wallet/.gitignore
+++ b/wallet/.gitignore
@@ -1,2 +1,2 @@
 /build
-/src/main/assets
+/src/main/assets/taler-wallet-android.js
diff --git a/wallet/.gitlab-ci.yml b/wallet/.gitlab-ci.yml
index bbc478a..bc7250b 100644
--- a/wallet/.gitlab-ci.yml
+++ b/wallet/.gitlab-ci.yml
@@ -1,11 +1,5 @@
-.binary_deps:
-  before_script:
-    - mkdir -p app/src/main/assets
-    - wget 
"https://git.taler.net/wallet-android.git/plain/taler-wallet-android.js?h=binary-deps";
 -O app/src/main/assets/taler-wallet-android.js
-
 wallet_test:
   stage: test
-  extends: .binary_deps
   only:
     changes:
       - wallet/**/*
@@ -20,7 +14,6 @@ wallet_test:
 wallet_deploy_nightly:
   stage: deploy
   resource_group: deploy_nightly
-  extends: .binary_deps
   only:
     changes:
       - wallet/**/*
diff --git a/wallet/README.md b/wallet/README.md
index e4cee9c..22e283f 100644
--- a/wallet/README.md
+++ b/wallet/README.md
@@ -1,31 +1,10 @@
 # GNU Taler Wallet
 
 This package implements a GNU Taler wallet for Android.
-It is currently a UI for the wallet writen in TypeScript.
+It is currently a UI for the wallet library writen in TypeScript.
 
 ## Building
 
-Currently, building the wallet for Android requires manually copying a 
dependency:
-
-`taler-wallet-android.js` -> `src/main/assets/taler-wallet-android.js`
-
-After that, the Android wallet can be built with Gradle:
+It can be built with Gradle:
 
     $ ./gradlew build
-
-## Obtaining Dependencies
-
-There are two ways of obtaining the dependencies.  The easiest one is
-to use the pre-built versions, which are stored in the "binary-deps"
-branch of the git://git.taler.net/wallet-android.git repository.
-
-An easy way to access them is using a git worktree:
-
-    $ git fetch origin binary-deps
-    $ git worktree add binary-deps binary-deps
-    $ cp binary-deps/taler-wallet-android.js 
src/main/assets/taler-wallet-android.js
-    $ git worktree remove binary-deps
-
-Alternatively, you can build it yourself from the repository:
-
- * git://git.taler.net/wallet-core.git
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
+}

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]