FsPages laisse la place à Gitlab Pages ! Voici la documentation pour vous en servir : https://docs.gitlab.com/ce/user/project/pages/index.html

pasteque-android

pasteque-android

Pasteque is a libre Point Of Sale software https://www.youtube.com/watch?v=s_Fp_0oj5aQ

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...
README.md Loading commit data...
build.gradle Loading commit data...
gradlew Loading commit data...
gradlew.bat Loading commit data...
proguard-project.txt Loading commit data...
project.properties Loading commit data...
settings.gradle Loading commit data...

Pasteque Android

http://www.pasteque.coop

build status

Presentation

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 https://github.com/ScilCoop/pasteque-android-gradle.git 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
Wcr

To be able to build and sign a Release apk, add keystore.properties 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>

Gradle

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)

Tests

##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.

##Development

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.