Skip to content

Commit

Permalink
Merge branch 'release/v2.3.2'
Browse files Browse the repository at this point in the history
* release/v2.3.2:
  Updates readme
  Bumps version code
  Adds quick "now" button for watering
  Updates versions and adds dev app name
  Added null check for pin dialog
  Fixes kryo error for duplicating plants
  • Loading branch information
7LPdWcaW committed Aug 26, 2018
2 parents d4eb68f + 7752d68 commit 26868eb
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 24 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Welcome to grow tracker. This app was created to help record data about growing plants in order to monitor the growing conditions to help make the plants grow better, and identify potential issues during the grow process.

[Latest APK: (MD5) 4905c7663556dc94a08c48418a7b4c94 v2.3.1](https://github.com/7LPdWcaW/GrowTracker-Android/releases/download/v2.3.1/v2.3.1-production.apk)
[Latest APK: (MD5) 83771de33b2f23c5157996e68abd8532 v2.3.2](https://github.com/7LPdWcaW/GrowTracker-Android/releases/download/v2.3.2/v2.3.2-production.apk)

[Latest APK (Discrete): (MD5) fd84ba3ac5c24a4b3f6ca16e5f3d5797 v2.3](https://github.com/7LPdWcaW/GrowTracker-Android/releases/download/v2.3.1/v2.3.1-discrete.apk)
[Latest APK (Discrete): (MD5) aade560ad850ca6c6996cfa8524dbecb v2.3.2](https://github.com/7LPdWcaW/GrowTracker-Android/releases/download/v2.3.2/v2.3.2-discrete.apk)

# Installation

Expand Down Expand Up @@ -158,7 +158,7 @@ You can decrypt your files using your passphrase either by writing a script that

# License

Copyright 2014-2017 7LPdWcaW
Copyright 2014-2018 7LPdWcaW

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
33 changes: 19 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ repositories {
}

android {
compileSdkVersion 25
buildToolsVersion "26.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.3"

defaultConfig {
applicationId "me.anon.grow"
minSdkVersion 17
targetSdkVersion 25
versionCode 15
versionName "2.3.1"
targetSdkVersion 27
versionCode 16
versionName "2.3.2"
}

lintOptions {
Expand All @@ -29,6 +29,8 @@ android {
"appType": "original"
]

resValue "string", "app_name", "GrowTracker"

dimension "type"
}

Expand All @@ -39,27 +41,30 @@ android {
"appType": "discrete"
]

resValue "string", "app_name", "Tracker"

dimension "type"
}
}

buildTypes {
debug {
resValue "string", "app_name", "Dev GrowTracker"
applicationIdSuffix = ".debug"
}
}
}

dependencies {
annotationProcessor 'org.projectlombok:lombok:1.16.14'
provided 'org.projectlombok:lombok:1.16.14'
provided 'org.glassfish:javax.annotation:10.0-b28'

implementation 'com.android.support:appcompat-v7:25.4.0'
implementation 'com.android.support:recyclerview-v7:25.4.0'
implementation 'com.android.support:cardview-v7:25.4.0'
implementation 'com.android.support:design:25.4.0'
implementation "com.android.support:exifinterface:25.4.0"
annotationProcessor 'org.projectlombok:lombok:1.16.20'
compileOnly 'org.projectlombok:lombok:1.16.20'
compileOnly 'org.glassfish:javax.annotation:10.0-b28'

implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation "com.android.support:exifinterface:27.1.1"

implementation 'com.esotericsoftware:kryo:3.0.3'
implementation 'com.google.code.gson:gson:2.8.1'
Expand Down
2 changes: 1 addition & 1 deletion app/src/discrete/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">Tracker</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
Expand All @@ -22,7 +23,7 @@ public class PinDialogFragment extends DialogFragment
{
public static interface OnDialogConfirmed
{
public void onDialogConfirmed(String input);
public void onDialogConfirmed(@Nullable String input);
}

public static interface OnDialogCancelled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ private void populateAddons()
{
@Override public void onDialogConfirmed(String input)
{
if (input.equals(pin.toString()))
if (pin.toString().equals(String.valueOf(input)))
{
// Encrypt plant data
PreferenceManager.getDefaultSharedPreferences(getActivity()).edit()
Expand Down
13 changes: 13 additions & 0 deletions app/src/main/java/me/anon/grow/fragment/WateringFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

import me.anon.controller.provider.PlantWidgetProvider;
import me.anon.grow.R;
Expand Down Expand Up @@ -468,4 +469,16 @@ private void setUi()
getActivity().setResult(Activity.RESULT_OK);
getActivity().finish();
}

@Views.OnClick(R.id.date_now) public void onDateNowClick(View view)
{
final DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(getActivity());
final DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(getActivity());

Calendar date = GregorianCalendar.getInstance();
String dateStr = dateFormat.format(date.getTime()) + " " + timeFormat.format(date.getTime());
WateringFragment.this.date.setText(dateStr);

water.setDate(date.getTimeInMillis());
}
}
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/Additive.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.anon.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

Expand All @@ -13,6 +14,7 @@
*/
@Getter @Setter
@Accessors(prefix = {"m", ""}, chain = true)
@NoArgsConstructor
public class Additive
{
private Double amount;
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/EmptyAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.support.annotation.Nullable;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
Expand All @@ -13,6 +14,7 @@
* @project GrowTracker
*/
@Getter @Setter
@NoArgsConstructor
public class EmptyAction extends Action
{
@Nullable private ActionName action;
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/Garden.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import java.util.ArrayList;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter @Setter
@Accessors(prefix = {"m", ""}, chain = true)
@NoArgsConstructor
public class Garden
{
protected String name;
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/NoteAction.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.anon.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
Expand All @@ -11,6 +12,7 @@
* @project GrowTracker
*/
@Getter @Setter
@NoArgsConstructor
public class NoteAction extends Action
{
public NoteAction(String note)
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/Nutrient.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.anon.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

Expand All @@ -14,6 +15,7 @@
@Deprecated
@Getter @Setter
@Accessors(prefix = {"m", ""}, chain = true)
@NoArgsConstructor
public class Nutrient
{
private Double npc; // nitrogen
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/Plant.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.UUID;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import me.anon.lib.DateRenderer;
Expand All @@ -30,6 +31,7 @@
*/
@Getter @Setter
@Accessors(prefix = {"m", ""}, chain = true)
@NoArgsConstructor
public class Plant
{
private String id = UUID.randomUUID().toString();
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/StageChange.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.anon.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

Expand All @@ -13,6 +14,7 @@
*/
@Getter @Setter
@Accessors(prefix = {"m", ""}, chain = true)
@NoArgsConstructor
public class StageChange extends Action
{
private PlantStage newStage;
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/me/anon/model/Water.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.List;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

Expand All @@ -16,6 +17,7 @@
*/
@Getter @Setter
@Accessors(prefix = {"m", ""}, chain = true)
@NoArgsConstructor
public class Water extends Action
{
private Double ppm;
Expand Down
17 changes: 15 additions & 2 deletions app/src/main/res/layout/add_watering_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
android:showDividers="middle"
android:layout_marginTop="16dp"
>
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/date_container"
Expand All @@ -228,10 +228,21 @@
android:paddingTop="8dp"
android:paddingBottom="16dp"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/date_now"
android:layout_alignParentEnd="true"
android:text="Now"
style="@style/Widget.AppCompat.Button.Borderless"
/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/date_text"
android:text="Date"
android:layout_toStartOf="@id/date_now"
style="@style/SubsectionTitle"
/>

Expand All @@ -242,9 +253,11 @@
android:editable="false"
android:inputType="none"
android:text="Today"
android:layout_toStartOf="@id/date_now"
android:layout_below="@id/date_text"
style="@style/SubsectionSubTitle"
/>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">GrowTracker</string>

</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.android.tools.build:gradle:3.1.4'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 26868eb

Please sign in to comment.