Giter VIP home page Giter VIP logo

pasteque-android's Introduction

Pasteque Android

http://www.pasteque.coop

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

(*) release not available right now

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.

pasteque-android's People

Contributors

dbarthe avatar jdelagorce avatar karamel59 avatar nsvir avatar pelarejo avatar pinaraf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.