From c9fb036798fc533a07b4b75386b51151b31f8be0 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Mon, 20 Jul 2020 16:37:46 -0300 Subject: [pos] create merchant-lib and move first v1 API endpoint there --- .gitlab-ci.yml | 1 + .idea/gradle.xml | 1 + merchant-lib/.gitignore | 1 + merchant-lib/.gitlab-ci.yml | 11 ++++ merchant-lib/build.gradle | 58 ++++++++++++++++++++++ merchant-lib/consumer-rules.pro | 0 merchant-lib/proguard-rules.pro | 21 ++++++++ merchant-lib/src/main/AndroidManifest.xml | 23 +++++++++ .../java/net/taler/merchantlib/ConfigResponse.kt | 34 +++++++++++++ .../main/java/net/taler/merchantlib/MerchantApi.kt | 43 ++++++++++++++++ .../java/net/taler/merchantlib/MerchantApiTest.kt | 43 ++++++++++++++++ .../java/net/taler/merchantlib/MockHttpClient.kt | 58 ++++++++++++++++++++++ merchant-terminal/build.gradle | 8 ++- .../java/net/taler/merchantpos/MainViewModel.kt | 4 +- .../net/taler/merchantpos/config/ConfigManager.kt | 31 +++++++----- merchant-terminal/src/main/res/values/strings.xml | 1 + settings.gradle | 1 + 17 files changed, 325 insertions(+), 14 deletions(-) create mode 100644 merchant-lib/.gitignore create mode 100644 merchant-lib/.gitlab-ci.yml create mode 100644 merchant-lib/build.gradle create mode 100644 merchant-lib/consumer-rules.pro create mode 100644 merchant-lib/proguard-rules.pro create mode 100644 merchant-lib/src/main/AndroidManifest.xml create mode 100644 merchant-lib/src/main/java/net/taler/merchantlib/ConfigResponse.kt create mode 100644 merchant-lib/src/main/java/net/taler/merchantlib/MerchantApi.kt create mode 100644 merchant-lib/src/test/java/net/taler/merchantlib/MerchantApiTest.kt create mode 100644 merchant-lib/src/test/java/net/taler/merchantlib/MockHttpClient.kt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index da3611e..48f1aec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: include: - local: 'cashier/.gitlab-ci.yml' + - local: 'merchant-lib/.gitlab-ci.yml' - local: 'merchant-terminal/.gitlab-ci.yml' - local: 'taler-kotlin-common/.gitlab-ci.yml' - local: 'wallet/.gitlab-ci.yml' diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 697ff36..581abbf 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -12,6 +12,7 @@