Skip to content

Commit

Permalink
Merge branch 'feature/persistence'
Browse files Browse the repository at this point in the history
  • Loading branch information
Christine Emrich committed Aug 11, 2020
2 parents 2200179 + 71073c2 commit d8b87fa
Show file tree
Hide file tree
Showing 74 changed files with 2,444 additions and 530 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ gradle-app.setting

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

/.idea/caches/build_file_checksums.ser
/.idea/caches/gradle_models.ser
/.idea/jarRepositories.xml

/app/release/output.json
/app/release/output-metadata.json
47 changes: 47 additions & 0 deletions .idea/assetWizardSettings.xml

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

7 changes: 6 additions & 1 deletion .idea/misc.xml

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

58 changes: 45 additions & 13 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
apply plugin: 'com.android.application'
apply plugin: 'com.mikepenz.aboutlibraries.plugin'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'


android {
compileSdkVersion 29
Expand All @@ -13,15 +17,26 @@ android {
versionName "3.4.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}
}

packagingOptions {
exclude 'META-INF/library-core_release.kotlin_module'
}
viewBinding {
enabled = true

buildFeatures {
viewBinding {
enabled = true
}
}

buildTypes {
Expand Down Expand Up @@ -61,9 +76,13 @@ configurations {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

// kotlin
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'

// tests
debugImplementation 'androidx.test:core:1.2.0'
debugImplementation 'androidx.fragment:fragment-testing:1.2.4'
debugImplementation 'androidx.fragment:fragment-testing:1.2.5'

// device tests
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
Expand All @@ -77,38 +96,49 @@ dependencies {
testImplementation 'org.robolectric:robolectric:4.3.1'

// support
implementation 'androidx.fragment:fragment:1.2.4'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.fragment:fragment:1.2.5'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.android.material:material:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.preference:preference:1.1.1'

// room database
def room_version = "2.2.5"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"


// helper
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'commons-io:commons-io:2.6'
implementation 'commons-io:commons-io:2.7'

// sortable list
implementation 'com.github.woxthebox:draglistview:1.7.0'
implementation 'com.github.woxthebox:draglistview:1.7.2'

// markdown
implementation 'ru.noties:markwon:2.0.2'

// fetch download manager
implementation 'androidx.tonyodev.fetch2:xfetch2:3.1.4'

// exo player
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.2'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.9.2'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.2'
implementation 'com.google.android.exoplayer:extension-mediasession:2.9.2'

// retrofit rest client
implementation 'com.squareup.retrofit2:retrofit:2.8.1'
implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.8.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'

// ACRA crash reporting
releaseImplementation 'ch.acra:acra:4.11'
releaseImplementation 'ch.acra:acra:4.11.1'

// timber logging
implementation 'com.jakewharton.timber:timber:4.7.1'
Expand All @@ -121,5 +151,7 @@ dependencies {
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'

// about libraries view
implementation 'com.mikepenz:aboutlibraries:8.1.2'
implementation 'com.mikepenz:aboutlibraries:8.3.0'

implementation 'org.jetbrains:annotations-java5:20.0.0'
}
181 changes: 181 additions & 0 deletions app/schemas/de.christinecoenen.code.zapp.persistence.Database/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "62cc23e0e67ad8479c9fce79f8615a6a",
"entities": [
{
"tableName": "PersistedMediathekShow",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `createdAt` INTEGER NOT NULL, `downloadId` INTEGER NOT NULL, `downloadedAt` INTEGER, `downloadedVideoPath` TEXT, `downloadStatus` INTEGER NOT NULL, `downloadProgress` INTEGER NOT NULL, `lastPlayedBackAt` INTEGER, `playbackPosition` INTEGER NOT NULL, `videoDuration` INTEGER NOT NULL, `apiId` TEXT, `topic` TEXT, `title` TEXT, `description` TEXT, `channel` TEXT, `timestamp` INTEGER NOT NULL, `size` INTEGER NOT NULL, `duration` TEXT, `filmlisteTimestamp` INTEGER NOT NULL, `websiteUrl` TEXT, `subtitleUrl` TEXT, `videoUrl` TEXT, `videoUrlLow` TEXT, `videoUrlHd` TEXT)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "createdAt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "downloadId",
"columnName": "downloadId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "downloadedAt",
"columnName": "downloadedAt",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "downloadedVideoPath",
"columnName": "downloadedVideoPath",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "downloadStatus",
"columnName": "downloadStatus",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "downloadProgress",
"columnName": "downloadProgress",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastPlayedBackAt",
"columnName": "lastPlayedBackAt",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "playbackPosition",
"columnName": "playbackPosition",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "videoDuration",
"columnName": "videoDuration",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediathekShow.apiId",
"columnName": "apiId",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.topic",
"columnName": "topic",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.title",
"columnName": "title",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.description",
"columnName": "description",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.channel",
"columnName": "channel",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.timestamp",
"columnName": "timestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediathekShow.size",
"columnName": "size",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediathekShow.duration",
"columnName": "duration",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.filmlisteTimestamp",
"columnName": "filmlisteTimestamp",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mediathekShow.websiteUrl",
"columnName": "websiteUrl",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.subtitleUrl",
"columnName": "subtitleUrl",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.videoUrl",
"columnName": "videoUrl",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.videoUrlLow",
"columnName": "videoUrlLow",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mediathekShow.videoUrlHd",
"columnName": "videoUrlHd",
"affinity": "TEXT",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [
{
"name": "index_PersistedMediathekShow_apiId",
"unique": true,
"columnNames": [
"apiId"
],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_PersistedMediathekShow_apiId` ON `${TABLE_NAME}` (`apiId`)"
}
],
"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, '62cc23e0e67ad8479c9fce79f8615a6a')"
]
}
}
Loading

0 comments on commit d8b87fa

Please sign in to comment.