Before gradle plugin update
This commit is contained in:
parent
b40f7f1f4f
commit
dfa41e9c94
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,16 +1,17 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'kotlin-kapt'
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'de.polyfish0.fitnessjourney'
|
||||
compileSdk 33
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "de.polyfish0.fitnessjourney"
|
||||
minSdk 24
|
||||
targetSdk 33
|
||||
minSdk 26
|
||||
targetSdk 34
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
@ -47,6 +48,29 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
def room_version = "2.5.2"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
annotationProcessor "androidx.room:room-compiler:$room_version"
|
||||
|
||||
// To use Kotlin annotation processing tool (kapt)
|
||||
kapt "androidx.room:room-compiler:$room_version"
|
||||
|
||||
// optional - RxJava2 support for Room
|
||||
//implementation "androidx.room:room-rxjava2:$room_version"
|
||||
|
||||
// optional - RxJava3 support for Room
|
||||
//implementation "androidx.room:room-rxjava3:$room_version"
|
||||
|
||||
// optional - Guava support for Room, including Optional and ListenableFuture
|
||||
//implementation "androidx.room:room-guava:$room_version"
|
||||
|
||||
// optional - Test helpers
|
||||
testImplementation "androidx.room:room-testing:$room_version"
|
||||
|
||||
// optional - Paging 3 Integration
|
||||
//implementation "androidx.room:room-paging:$room_version"
|
||||
|
||||
implementation "com.google.accompanist:accompanist-systemuicontroller:0.27.0"
|
||||
implementation 'com.google.android.material:material:1.9.0'
|
||||
implementation "androidx.navigation:navigation-compose:2.5.3"
|
||||
|
@ -0,0 +1,10 @@
|
||||
package de.polyfish0.fitnessjourney.database
|
||||
|
||||
import androidx.room.ColumnInfo
|
||||
import androidx.room.PrimaryKey
|
||||
|
||||
data class PictureEntity(
|
||||
@PrimaryKey val pid: Int,
|
||||
@ColumnInfo(name = "path") val path: String,
|
||||
@ColumnInfo(name = "date") val date: Date
|
||||
)
|
@ -0,0 +1,16 @@
|
||||
package de.polyfish0.fitnessjourney.database.converter
|
||||
|
||||
import androidx.room.TypeConverter
|
||||
import java.time.LocalDateTime
|
||||
|
||||
class LocalDateTimeConverter {
|
||||
@TypeConverter
|
||||
fun fromTimestamp(value: String?): LocalDateTime? {
|
||||
return value?.let { LocalDateTime.parse(it) }
|
||||
}
|
||||
|
||||
@TypeConverter
|
||||
fun dateToTimestamp(date: LocalDateTime?): String? {
|
||||
return date?.toString()
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '8.0.2' apply false
|
||||
id 'com.android.library' version '8.0.2' apply false
|
||||
id 'com.android.application' version '8.1.0-rc01' apply false
|
||||
id 'com.android.library' version '8.1.0-rc01' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
||||
}
|
Loading…
Reference in New Issue
Block a user