Skip to content

Commit

Permalink
Merge pull request #101 from QuantumPhysique/main2add_new_stats
Browse files Browse the repository at this point in the history
Merge main in MR #31
  • Loading branch information
gwosd committed Jun 7, 2024
2 parents eaab149 + ecd337e commit 80772ae
Show file tree
Hide file tree
Showing 26 changed files with 1,264 additions and 243 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Download trale version X from F-Droid / Github
2. Go to '...'
3. Click on '....'
4. Scroll down to '....'
5. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**User Information (please complete the following information):**
- Device: [e.g. Pixel 6a]
- OS: [e.g. Stock ROM Android 14]
- Version: [e.g. 0.6.1]
- Downloaded: [e.g. F-Droid]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 1 addition & 1 deletion .github/workflows/build-flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: ⚙️ Setup Java
uses: actions/setup-java@v4
with:
java-version: "11.x"
java-version: "17.x"
cache: 'gradle'
distribution: 'adopt'
id: java
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flutter-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: ⚙️ Setup Java
uses: actions/setup-java@v4
with:
java-version: "11.x"
java-version: "17.x"
cache: 'gradle'
distribution: 'adopt'
id: java
Expand Down
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,25 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Fixed a bug that caused a small icon to be displayed in the F-Droid store (German).


## [0.7.0] - 2024-05-29
### Added Features and Improvements 🙌:
- Hello World! Thx to the community, the app is now available in French, Finnish, and Italian 🎉
- Using the latest flutter 3.22 with upgraded deps

### Other changes:
- Improved translations


## [0.6.2] - 2024-04-02
### Bugfix 🐛:
- Fix bug that prevents app to start, #70

## [0.6.1] - 2024-03-21
### Added Features and Improvements 🙌:
- All new and improved interpolation API, the predictions are now more reliable
- Using the latest flutter 3.19 with upgraded deps
- Compile against Android 14 (SDK34)
- Hello World! Thx to the community, the app is now available in Lithuanian, Chinese and Spanish 🎉
- Hello World! Thx to the community, the app is now available in Lithuanian, Chinese, and Spanish 🎉

### Bugfix 🐛:
- Fix bug, when reloading theme
Expand Down Expand Up @@ -171,7 +184,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- initial release


[Unreleased]: https://github.com/quantumphysique/trale/compare/v0.6.1...main
[Unreleased]: https://github.com/quantumphysique/trale/compare/v0.7.0...main
[0.7.0]: https://github.com/quantumphysique/trale/compare/v0.6.2...v0.7.0
[0.6.2]: https://github.com/quantumphysique/trale/compare/v0.6.1...v0.6.2
[0.6.1]: https://github.com/quantumphysique/trale/compare/v0.5.0...v0.6.1
[0.5.0]: https://github.com/quantumphysique/trale/compare/v0.4.7...v0.5.0
[0.4.7]: https://github.com/quantumphysique/trale/compare/v0.4.6...v0.4.7
Expand Down
29 changes: 17 additions & 12 deletions app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,10 +22,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
Expand All @@ -33,15 +30,15 @@ if (keystorePropertiesFile.exists()) {

android {
compileSdkVersion 34
ndkVersion "25.1.8937393"
ndkVersion "26.1.10909125"

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "de.quantumphysique.trale"
minSdkVersion 19
minSdkVersion flutter.minSdkVersion
targetSdkVersion 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down Expand Up @@ -82,6 +79,14 @@ android {
'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
namespace 'de.quantumphysique.trale'
}

Expand All @@ -90,7 +95,7 @@ flutter {
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.0.0"
}

// Map for the version code that gives each ABI a value.
Expand Down
13 changes: 0 additions & 13 deletions app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.9.23'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand Down
2 changes: 1 addition & 1 deletion app/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
25 changes: 25 additions & 0 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.2.2" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}


include ':app'

def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
Expand Down
3 changes: 3 additions & 0 deletions app/lib/core/language.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class Language {
'de': 'Deutsch',
'en': 'English',
'es': 'Español',
'fi': 'Suomi',
'fr': 'Français',
'it': 'Italiano',
'ko': '조선말',
'lt': 'Lietuvių',
'nb': 'Bokmål',
Expand Down
5 changes: 5 additions & 0 deletions app/lib/core/measurementDatabase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ class MeasurementDatabase {
/// get number of measurements
int get nMeasurements => measurements.length;

/// date of latest measurement
DateTime get lastDate => sortedMeasurements.first.measurement.date;
/// date of first measurement
DateTime get firstDate => sortedMeasurements.last.measurement.date;

/// bmi at last measurement
// double? get bmi {
// final double? height = Preferences().userHeight;
Expand Down
Loading

0 comments on commit 80772ae

Please sign in to comment.