Pasteque is a libre Point Of Sale software

Name Last Update
app Loading commit data...
drawable_src Loading commit data...
gradle/wrapper Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
COPYRIGHT Loading commit data...
LICENSE Loading commit data... Loading commit data...
build.gradle Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
proguard-project.txt Loading commit data... Loading commit data...
settings.gradle Loading commit data...

Pasteque Android

build status


Pasteque Android is a POS (point of sale) project under the GNU General Public License v3. Our environment is the combination of Gradle, its Android plugin, and the Android SDK

Quick Start

Download the project.

$ git clone pasteque-android
$ cd pasteque-android

Make sure you have installed:

Specify the path to your Android SDK in the ANDROID_HOME variable

$ export ANDROID_HOME='your path'

You can know use Gradle to assemble and install the project on your pluged device with

$ gradle installVanillaDebug

Design Decision

Our project holds independent customisations and features for different APKs in the same build. Everything works with the Build Variants feature of the Android plugin. Run gradle -q flavors to get the list of all the product flavors

Build Type + Product Flavor = Build Variant

Quick Start exemple: Debug + Vanilla = VanillaDebug

You can build the project by: build type, product flavor or build variant with:

  1. gradle assemble<Variant Name>
  2. gradle assemble<Build Type Name>
  3. gradle assemble<Product Flavor Name>

But you can only install build variants on your device with:

$ gradle install<VariantName>

Our current project holds:

Build Type productFlavor
Debug Vanilla
Release Bnp

To be able to build and sign a Release apk, add in app/ with the following content:

storeFile=<path to your keystore file>
storePassword=<password of your keystore file>
keyAlias=<key to use from the keystore to sign the apk>
keyPassword=<key password>


Our repository hold a master gradle: ./build.gradle and a subproject, which is the application: ./app/build.gradle. You mostly have to edit the app subproject's gradle.

You can list all the available tasks with: gradle tasks. Every informations can be found in the android's plugins reference

##Add a flavor To add a flavor, you have to create a new folder with the basic files of Vanilla.

cp -r app/src/vanilla app/src/yourFlavorName

and add the flavor's packageName in app/build.gradle

ext {
    flavors = [
        "YourFlavorName": [packageName: "your.flavor.packagename"],

Flavors attributes are:

  • packageName: the Android 'applicationID' (required)
  • applicationName: the 'app_name' of your application (optionnal)


##Architecture There are 2 kinds of tests:

  • Instrumental, for tests that requires a device/emulator Placed in the folder app/src/androidTest, you can run them with:

    gradle connectedAndroidTest / gradle connectedAndroidTest<VariantName>

  • Unit, for simple java unit tests Placed in the folder app/src/test, you can run them with:

    gradle test / gradle test<VariantName>

You might want to read Testing Fundamentals for Android tests explinations and the Testing section of Gradle's Android plugin's documentation for the gradle's behavior.


Our tests are powered by Junit 4.12 with EasyMock and his PowerMock extension.

You might want to read some EasyMock Samples and the Android good practice section to get some examples.