Skip to content

Commit

Permalink
Version 1.9.0
Browse files Browse the repository at this point in the history
- Rework of the ui
- Preparation for room database upgrades
- Preparation for lunch data auto import

Signed-off-by: Niklas Merkelt <niklasmerkelt@mail.de>
  • Loading branch information
hibo98 committed Jan 9, 2025
1 parent d76e396 commit a8b6ba0
Show file tree
Hide file tree
Showing 56 changed files with 1,807 additions and 645 deletions.
3 changes: 3 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

340 changes: 340 additions & 0 deletions .idea/other.xml

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 19 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.application'
apply plugin: 'androidx.room'

android {

Expand All @@ -8,27 +9,39 @@ android {
applicationId "de.schkola.kitchenscanner"
minSdkVersion 24
targetSdkVersion 34
versionCode 1800
versionName "1.8.0"
versionCode 1900
versionName "1.9.0"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'de.schkola.kitchenscanner'
buildFeatures {
viewBinding true
}
room {
schemaDirectory "$projectDir/schemas"
}
}

dependencies {
implementation 'org.jetbrains:annotations:24.0.1'
implementation 'org.jetbrains:annotations:26.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.7'
implementation 'androidx.navigation:navigation-fragment:2.8.5'
implementation 'androidx.navigation:navigation-ui:2.8.5'
implementation 'androidx.activity:activity:1.9.3'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.7'
runtimeOnly fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.fragment:fragment:1.8.5'
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.room:room-runtime:2.6.1'
annotationProcessor 'androidx.room:room-compiler:2.6.1'
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"
implementation 'com.google.android.material:material:1.12.0'
implementation 'io.github.g00fy2.quickie:quickie-bundled:1.10.0'
implementation 'org.apache.commons:commons-csv:1.11.0'
implementation 'org.apache.commons:commons-csv:1.12.0'
def lifecycle_version = "2.8.7"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "e86d491c82440c2f55e948ed0b642905",
"entities": [
{
"tableName": "customers",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`xba` INTEGER NOT NULL, `name` TEXT, `grade` TEXT, `lunch` INTEGER NOT NULL, `gotLunch` INTEGER NOT NULL, PRIMARY KEY(`xba`))",
"fields": [
{
"fieldPath": "xba",
"columnName": "xba",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "grade",
"columnName": "grade",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "lunch",
"columnName": "lunch",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "gotLunch",
"columnName": "gotLunch",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"xba"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "allergies",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`allergyId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `allergy` TEXT, `xba` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "allergyId",
"columnName": "allergyId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "allergy",
"columnName": "allergy",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "xba",
"columnName": "xba",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"allergyId"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e86d491c82440c2f55e948ed0b642905')"
]
}
}
116 changes: 116 additions & 0 deletions app/schemas/de.schkola.kitchenscanner.database.LunchDatabase/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "a781fc58faae154032387af6bb4353de",
"entities": [
{
"tableName": "customers",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`xba` INTEGER NOT NULL, `name` TEXT, `grade` TEXT, `lunch` INTEGER NOT NULL, `gotLunch` INTEGER NOT NULL, PRIMARY KEY(`xba`))",
"fields": [
{
"fieldPath": "xba",
"columnName": "xba",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "grade",
"columnName": "grade",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "lunch",
"columnName": "lunch",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "gotLunch",
"columnName": "gotLunch",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"xba"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "allergies",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`allergyId` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `allergy` TEXT, `xba` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "allergyId",
"columnName": "allergyId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "allergy",
"columnName": "allergy",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "xba",
"columnName": "xba",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"allergyId"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "master_data",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`key`))",
"fields": [
{
"fieldPath": "key",
"columnName": "key",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"key"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'a781fc58faae154032387af6bb4353de')"
]
}
}
17 changes: 11 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<application
android:allowBackup="true"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_descriptor"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
Expand All @@ -18,7 +19,7 @@
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".activity.MainActivity"
android:name=".activity.MainBottomNavActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand All @@ -28,15 +29,19 @@
<activity
android:name=".activity.SettingsActivity"
android:label="@string/settings"
android:parentActivityName=".activity.MainActivity" />
android:parentActivityName=".activity.MainBottomNavActivity" />
<activity
android:name=".activity.DisplayActivity"
android:label="@string/lunch_display"
android:parentActivityName=".activity.MainActivity" />
android:parentActivityName=".activity.MainBottomNavActivity" />
<activity
android:name=".activity.StatsActivity"
android:label="@string/stats"
android:parentActivityName=".activity.MainActivity" />
android:name=".activity.HelpActivity"
android:label="@string/help_display"
android:parentActivityName=".activity.MainBottomNavActivity" />
<activity
android:name=".activity.ImportExportActivity"
android:label="@string/import_export_display"
android:parentActivityName=".activity.MainBottomNavActivity" />
</application>

</manifest>
Loading

0 comments on commit a8b6ba0

Please sign in to comment.