new: usr: First beta release.

Signed-off-by: default avatarFrancesc Gordillo i Cortínez <frangor@frangor.info>
parent 7930174e
Pipeline #3463137 passed with stage
in 4 minutes and 58 seconds
##
## Format
##
## ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]
##
## Description
##
## ACTION is one of 'chg', 'fix', 'new'
##
## Is WHAT the change is about.
##
## 'chg' is for refactor, small improvement, cosmetic changes...
## 'fix' is for bug fixes
## 'new' is for new features, big improvement
##
## AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'
##
## Is WHO is concerned by the change.
##
## 'dev' is for developpers (API changes, refactors...)
## 'usr' is for final users (UI changes)
## 'pkg' is for packagers (packaging changes)
## 'test' is for testers (test only related changes)
## 'doc' is for doc guys (doc only changes)
##
## COMMIT_MSG is ... well ... the commit message itself.
##
## TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'
##
## They are preceded with a '!' or a '@' (prefer the former, as the
## latter is wrongly interpreted in github.) Commonly used tags are:
##
## 'refactor' is obviously for refactoring code only
## 'minor' is for a very meaningless change (a typo, adding a comment)
## 'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
## 'wip' is for partial functionality but complete subfunctionality.
##
## Example:
##
## new: usr: support of bazaar implemented
## chg: re-indentend some lines !cosmetic
## new: dev: updated code to be compatible with last version of killer lib.
## fix: pkg: updated year of licence coverage.
## new: test: added a bunch of test around user usability of feature X.
## fix: typo in spelling my name in comment. !minor
##
## Please note that multi-line commit message are supported, and only the
## first line will be considered as the "summary" of the commit message. So
## tags, and other rules only applies to the summary. The body of the commit
## message will be displayed in the changelog without reformatting.
##
## ``ignore_regexps`` is a line of regexps
##
## Any commit having its full commit message matching any regexp listed here
## will be ignored and won't be reported in the changelog.
##
ignore_regexps = [
r'@minor', r'!minor',
r'@cosmetic', r'!cosmetic',
r'@refactor', r'!refactor',
r'@wip', r'!wip',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:',
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
]
## ``section_regexps`` is a list of 2-tuples associating a string label and a
## list of regexp
##
## Commit messages will be classified in sections thanks to this. Section
## titles are the label, and a commit is classified under this section if any
## of the regexps associated is matching.
##
section_regexps = [
('New', [
r'^[nN]ew\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Changes', [
r'^[cC]hg\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Fix', [
r'^[fF]ix\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n]*)$',
]),
('Other', None ## Match all lines
),
]
## ``body_process`` is a callable
##
## This callable will be given the original body and result will
## be used in the changelog.
##
## Available constructs are:
##
## - any python callable that take one txt argument and return txt argument.
##
## - ReSub(pattern, replacement): will apply regexp substitution.
##
## - Indent(chars=" "): will indent the text with the prefix
## Please remember that template engines gets also to modify the text and
## will usually indent themselves the text if needed.
##
## - Wrap(regexp=r"\n\n"): re-wrap text in separate paragraph to fill 80-Columns
##
## - noop: do nothing
##
## - ucfirst: ensure the first letter is uppercase.
## (usually used in the ``subject_process`` pipeline)
##
## - final_dot: ensure text finishes with a dot
## (usually used in the ``subject_process`` pipeline)
##
## - strip: remove any spaces before or after the content of the string
##
## Additionally, you can `pipe` the provided filters, for instance:
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)') | Indent(chars=" ")
#body_process = Wrap(regexp=r'\n(?=\w+\s*:)')
#body_process = noop
body_process = ReSub(r'((^|\n)[A-Z]\w+(-\w+)*: .*(\n\s+.*)*)+$', r'') | strip
## ``subject_process`` is a callable
##
## This callable will be given the original subject and result will
## be used in the changelog.
##
## Available constructs are those listed in ``body_process`` doc.
subject_process = (strip |
ReSub(r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*((dev|use?r|pkg|test|doc)\s*:\s*)?([^\n@]*)(@[a-z]+\s+)*$', r'\4') |
ucfirst | final_dot)
## ``tag_filter_regexp`` is a regexp
##
## Tags that will be used for the changelog must match this regexp.
##
tag_filter_regexp = r'^[0-9]+\.[0-9]+(\.[0-9]+)?$'
## ``unreleased_version_label`` is a string
##
## This label will be used as the changelog Title of the last set of changes
## between last valid tag and HEAD if any.
unreleased_version_label = "%%version%% (unreleased)"
## ``output_engine`` is a callable
##
## This will change the output format of the generated changelog file
##
## Available choices are:
##
## - rest_py
##
## Legacy pure python engine, outputs ReSTructured text.
## This is the default.
##
## - mustache(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mustache/*.tpl``.
## Requires python package ``pystache``.
## Examples:
## - mustache("markdown")
## - mustache("restructuredtext")
##
## - makotemplate(<template_name>)
##
## Template name could be any of the available templates in
## ``templates/mako/*.tpl``.
## Requires python package ``mako``.
## Examples:
## - makotemplate("restructuredtext")
##
output_engine = rest_py
#output_engine = mustache("restructuredtext")
#output_engine = mustache("markdown")
#output_engine = makotemplate("restructuredtext")
## ``include_merge`` is a boolean
##
## This option tells git-log whether to include merge commits in the log.
## The default is to include them.
include_merge = True
local.properties
.gradle/
build/
*.swp
before_script:
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip openjdk-7-jdk lib32stdc++6 lib32z1
- wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
- tar --extract --gzip --file=android-sdk.tgz
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-23
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter platform-tools
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter build-tools-23.0.3
- echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository
- export ANDROID_HOME=$PWD/android-sdk-linux
build:
script:
- ./gradlew assembleDebug check --stacktrace
artifacts:
paths:
- build/outputs/lint-results-debug.html
- build/outputs/lint-results-debug.xml
- build/outputs/lint-results-debug_files
Changelog
=========
0.0.1 (2016-04-17)
------------------
New
~~~
- First beta release. [Francesc Gordillo i Cortínez]
This diff is collapsed.
LaiCare
=======
# LaiCare
[![build status](https://gitlab.com/frangor/laicare/badges/master/build.svg)](https://gitlab.com/frangor/laicare/commits/master)
Android app to manage the care of dogs and cats.
<img src="https://gitlab.com/frangor/laicare/raw/master/screenshots.png" width="800"/>
## Features
* Dogs and cats manager.
* Treatments manager.
* Appointments manager with reminder notifications.
* Weight control with monitoring chart.
## Build requeriments
* openjdk-7-jdk
* android-sdk
## Build instructions
* On GNU/Linux:
./gradlew assembleDebug
* On Windows:
gradlew.bat assembleDebug
......@@ -4,18 +4,76 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
classpath('fr.avianey.androidsvgdrawable:gradle-plugin:3.0.0') {
exclude group: 'xerces'
}
}
}
apply plugin: 'android'
apply plugin: 'com.android.application'
apply plugin: 'androidsvgdrawable'
android {
compileSdkVersion 'android-22'
compileSdkVersion 'android-23'
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "info.frangor.laicare"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "0.0.1"
resConfigs "en", "es", "ca"
}
if(project.hasProperty("RELEASE_STORE_FILE")) {
signingConfigs {
release {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFile getDefaultProguardFile('proguard-android.txt')
if(project.hasProperty("RELEASE_STORE_FILE")) {
release {
debuggable false
minifyEnabled true
proguardFile 'proguard.txt'
proguardFile getDefaultProguardFile('proguard-android.txt')
signingConfig signingConfigs.release
}
}
debug {
debuggable true
}
}
sourceSets {
main.res.srcDirs = [main.res.srcDirs, "build/generated/res/main"]
}
lintOptions {
disable 'GoogleAppIndexingWarning'
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:deprecation"
}
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile "com.android.support:appcompat-v7:23.4.0"
compile "com.android.support:recyclerview-v7:23.4.0"
compile "com.android.support:design:23.4.0"
compile 'com.takisoft.fix:preference-v7:23.4.0.4'
compile "com.makeramen:roundedimageview:2.2.1"
compile 'com.jjoe64:graphview:4.0.1'
}
task svgToPng(type: fr.avianey.androidsvgdrawable.gradle.SvgDrawableTask) {
from = files('src/main/svg-png')
to = file('build/generated/res/main')
createMissingDirectories = true
overwriteMode = 'ifModified'
targetedDensities = ['ldpi', 'hdpi', 'mdpi', 'xhdpi', 'xxhdpi', 'xxxhdpi']
outputFormat = 'PNG'
outputType = 'drawable'
}
......@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-2.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
-dontwarn com.makeramen.**
......@@ -3,6 +3,7 @@ package info.frangor.laicare;
import android.test.ActivityInstrumentationTestCase2;
/**
* TODO
* This is a simple framework for a test of an Application. See
* {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on
* how to write and extend Application tests.
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="info.frangor.laicare"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name="LaiCare"
package="info.frangor.laicare">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<application android:label="@string/app_name"
android:name=".Controller"
android:icon="@drawable/icon"
android:allowBackup="false"
android:theme="@style/laicare_base"
android:supportsRtl="false"
>
<activity android:name=".view.PetList"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".view.TreatmentList"
android:label="@string/treatments"
/>
<activity android:name=".view.PetTabs"
/>
<activity android:name=".view.SettingsActivity"
android:label="@string/settings"
/>
<activity android:name=".view.AboutActivity"
android:label="@string/about"
/>
<receiver android:name=".service.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name=".service.StartAppointments"></receiver>
<service android:name=".service.AppointmentsNotify"
android:enabled="true"
android:exported="false"
/>
</application>
</manifest>
/* This file is part of LaiCare.
*
* LaiCare is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LaiCare is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with My Expenses. If not, see <http://www.gnu.org/licenses/>.
*/
package info.frangor.laicare;
import android.app.Application;
import java.util.ArrayList;
import java.util.List;
import info.frangor.laicare.exceptions.NoAddedItem;
import info.frangor.laicare.exceptions.NoDeletedItem;
import info.frangor.laicare.model.CheckPoint;
import info.frangor.laicare.model.Pet;
import info.frangor.laicare.model.SQLiteStore;
import info.frangor.laicare.model.Appointment;
import info.frangor.laicare.model.Treatment;
/**
* Controller Class.
*/
public class Controller extends Application {
private static SQLiteStore db;
private List<Pet> pets = new ArrayList<Pet>();
private List<Treatment> treatments = new ArrayList<Treatment>();
@Override
public void onCreate() {
super.onCreate();
db = SQLiteStore.getInstance(this);
pets = db.getPets();
treatments = db.getTreatments();
}
/**
* Get the pet from a position in the pet list.
*/
public Pet getPet(int position) {
return pets.get(position);
}
/**
* Get number of pets.
*/
public int getPetListSize() {
return pets.size();
}
/**
* Save a pet.
*/
public void addPet(Pet pet) throws NoAddedItem {
if (pet.save(db)) {
pets = db.getPets();
} else {
throw new NoAddedItem("Could not add Pet with id "+
String.valueOf(pet.getId()));
}
}
/**
* Delete a pet.
*/
public void delPet(int petId) throws NoDeletedItem {
if (db.delPet(petId)) {
pets = db.getPets();
} else {
throw new NoDeletedItem("Could not delete Pet with id "+
String.valueOf(petId));
}
}
/**
* Get the treatment from a position in the treatment list.
*/
public Treatment getTreatment(int position) {
return treatments.get(position);
}
/**
* Get number of treatments.
*/
public int getTreatmentListSize() {
return treatments.size();
}
/**
* Save a treatment.
*/
public void addTreatment(Treatment treatment) throws NoAddedItem {
if (treatment.save(db)) {
treatments = db.getTreatments();
} else {
throw new NoAddedItem("Could not add Treatment with id "+
String.valueOf(treatment.getId()));
}
}
/**
* Delete a treatment.
*/
public void delTreatment(int treatmentId) throws NoDeletedItem {
if (db.delTreatment(treatmentId)) {
treatments = db.getTreatments();
} else {
throw new NoDeletedItem("Could not delete Treatment with id "+
String.valueOf(treatmentId));
}
}
/**
* Get list of Treatments available for a Pet.
*/
public List<Treatment> getTreatments(int petId) {
return db.getTreatments(petId);
}
/**
* Get list of CheckPoints.
*/
public List<CheckPoint> getCheckPoints(int petId) {
return db.getCheckPoints(petId);
}
/**
* Save a CheckPoint.
*/
public void addCheckPoint(CheckPoint checkPoint) throws NoAddedItem {
if(!checkPoint.save(db)) {
throw new NoAddedItem("Could not add CheckPoint with id "+
String.valueOf(checkPoint.getId()));
}
}
/**
* Delete a CheckPoint.
*/
public void delCheckPoint(int checkPointId) throws NoDeletedItem {
if (!db.delCheckPoint(checkPointId)) {
throw new NoDeletedItem("Could not delete CheckPoint with id "+
String.valueOf(checkPointId));
}
}
/**
* Get list of Appointments.
*/
public List<Appointment> getAppointments(int petId) {
return db.getAppointments(petId);
}
/**
* Save an Appointment.
*/
public void addAppointment(Appointment appointment) throws NoAddedItem {
if(!appointment.save(db)) {
throw new NoAddedItem("Could not add Appointment with id "+
String.valueOf(appointment.getId()));
}
}
/**
* Delete an Appointment.
*/
public void delAppointment(int appointmentId) throws NoDeletedItem {
if (!db.delAppointment(appointmentId)) {
throw new NoDeletedItem("Could not delete Appointment with id "+
String.valueOf(appointmentId));
}
}
}
package info.frangor.laicare;
import android.app.Activity;
import android.os.Bundle;
public class LaiCare extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
/* This file is part of LaiCare.
*
* LaiCare is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LaiCare is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with My Expenses. If not, see <http://www.gnu.org/licenses/>.
*/
package info.frangor.laicare.exceptions;
/**
* NoAddedItem exception.
*/
public class NoAddedItem extends Exception {
public NoAddedItem() {
super();
}
public NoAddedItem(String message) {
super(message);
}
public NoAddedItem(String message, Throwable cause) {
super(message, cause);
}
public NoAddedItem(Throwable cause) {
super(cause);
}
}
/* This file is part of LaiCare.
*
* LaiCare is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LaiCare is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with My Expenses. If not, see <http://www.gnu.org/licenses/>.
*/
package info.frangor.laicare.exceptions;
/**
* NoDeletedItem exception.
*/
public class NoDeletedItem extends Exception {
public NoDeletedItem() {
super();
}
public NoDeletedItem(String message) {
super(message);
}
public NoDeletedItem(String message, Throwable cause) {
super(message, cause);
}
public NoDeletedItem(Throwable cause) {
super(cause);
}
}
/* This file is part of LaiCare.
*
* LaiCare is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LaiCare is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the