Skip to content

Commit

Permalink
feat: upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
biezhihua committed Mar 29, 2021
1 parent 8946007 commit 8f56538
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 46 deletions.
56 changes: 28 additions & 28 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ apply plugin: 'kotlin-kapt'
apply plugin: "androidx.navigation.safeargs"

android {
compileSdkVersion 28
compileSdkVersion 29

defaultConfig {
applicationId "com.bzh.dytt"
minSdkVersion 21
targetSdkVersion 28
targetSdkVersion 29
versionCode 10
versionName "5.5"
versionName "5.6"
testInstrumentationRunner "com.bzh.dytt.util.DyttTestRunner"

javaCompileOptions {
Expand Down Expand Up @@ -81,48 +81,48 @@ configurations.all {
dependencies {

//
kapt 'androidx.lifecycle:lifecycle-compiler:2.2.0'
kapt 'androidx.room:room-compiler:2.2.3'
kapt 'androidx.lifecycle:lifecycle-compiler:2.3.1'
kapt 'androidx.room:room-compiler:2.2.6'
kapt 'com.google.dagger:dagger-android-processor:2.17'
kapt 'com.google.dagger:dagger-compiler:2.17'
kapt 'com.github.bumptech.glide:compiler:4.9.0'

implementation project(':key')

//
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72"

//
implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.fragment:fragment:1.2.0'
implementation 'androidx.media:media:1.2.0-alpha01'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.fragment:fragment:1.3.2'
implementation 'androidx.media:media:1.3.0-rc02'
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.2.0-alpha02'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.3.0-rc01'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
implementation 'androidx.test.espresso:espresso-idling-resource:3.3.0-alpha03'
implementation 'androidx.recyclerview:recyclerview:1.2.0-rc01'
implementation 'androidx.test.espresso:espresso-idling-resource:3.4.0-alpha05'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.palette:palette:1.0.0'
implementation 'androidx.core:core-ktx:1.1.0'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata:2.2.0'
implementation 'androidx.paging:paging-runtime:2.1.1'
implementation 'androidx.room:room-runtime:2.2.3'
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.3.1'
implementation 'androidx.lifecycle:lifecycle-livedata:2.3.1'
implementation 'androidx.paging:paging-runtime:2.1.2'
implementation 'androidx.room:room-runtime:2.2.6'

implementation "android.arch.work:work-runtime-ktx:1.0.1"
implementation 'com.google.android.material:material:1.2.0-alpha04'
implementation 'com.google.android.material:material:1.4.0-alpha01'

//
implementation 'com.airbnb.android:lottie:2.6.1'

//
implementation(name: 'key-release', ext: 'aar')
// implementation(name: 'key-release', ext: 'aar')

//
implementation 'org.jsoup:jsoup:1.8.3'
Expand Down Expand Up @@ -152,7 +152,7 @@ dependencies {
implementation "android.arch.navigation:navigation-ui:1.0.0" // use -ktx for Kotlin

// java
testImplementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.13'
testImplementation 'org.mockito:mockito-core:2.22.0'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'com.squareup.okhttp3:mockwebserver:3.9.1'
Expand All @@ -162,15 +162,15 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-core-utils'
})
testImplementation 'androidx.room:room-testing:2.2.3'
testImplementation 'androidx.room:room-testing:2.2.6'
testImplementation 'org.jsoup:jsoup:1.8.3'

// ui
androidTestImplementation 'androidx.recyclerview:recyclerview:1.2.0-alpha01'
androidTestImplementation 'androidx.appcompat:appcompat:1.2.0-alpha02'
androidTestImplementation 'com.google.android.material:material:1.2.0-alpha04'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha03'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0-alpha03'
androidTestImplementation 'androidx.recyclerview:recyclerview:1.2.0-rc01'
androidTestImplementation 'androidx.appcompat:appcompat:1.3.0-rc01'
androidTestImplementation 'com.google.android.material:material:1.4.0-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0-alpha05'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0-alpha05'
androidTestImplementation 'androidx.arch.core:core-testing:2.1.0'
androidTestImplementation 'org.mockito:mockito-core:2.22.0'
androidTestImplementation 'com.linkedin.dexmaker:dexmaker-mockito:2.2.0'
Expand Down
11 changes: 6 additions & 5 deletions app/schemas/com.bzh.dytt.db.DyttDB/5.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"formatVersion": 1,
"database": {
"version": 5,
"identityHash": "1fdde7b92ce9d7ed66ccec44dfcd7f76",
"identityHash": "45ba4b76e26fa4be65ed1d2193c1f94d",
"entities": [
{
"tableName": "movie_detail",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `categoryId` INTEGER NOT NULL, `name` TEXT NOT NULL, `publishTime` TEXT NOT NULL, `homePicUrl` TEXT, `pics` TEXT, `downloadUrl` TEXT, `content` TEXT, `isPrefect` INTEGER NOT NULL, PRIMARY KEY(`id`, `categoryId`))",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `categoryId` INTEGER NOT NULL, `name` TEXT, `publishTime` TEXT, `homePicUrl` TEXT, `pics` TEXT, `downloadUrl` TEXT, `content` TEXT, `isPrefect` INTEGER NOT NULL, PRIMARY KEY(`id`, `categoryId`))",
"fields": [
{
"fieldPath": "id",
Expand All @@ -24,13 +24,13 @@
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
"notNull": false
},
{
"fieldPath": "publishTime",
"columnName": "publishTime",
"affinity": "TEXT",
"notNull": true
"notNull": false
},
{
"fieldPath": "homePicUrl",
Expand Down Expand Up @@ -74,9 +74,10 @@
"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, \"1fdde7b92ce9d7ed66ccec44dfcd7f76\")"
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '45ba4b76e26fa4be65ed1d2193c1f94d')"
]
}
}
4 changes: 2 additions & 2 deletions app/src/main/java/com/bzh/dytt/ui/detail/DetailFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class DetailFragment : BaseFragment(), Injectable {
viewModel.paramsLiveData.value = movieDetail
if (movieDetail != null && activity != null) {
val actionBar = (activity as AppCompatActivity).supportActionBar
actionBar?.title = getSimpleTitle(movieDetail.name)
actionBar?.title = movieDetail.name?.let { getSimpleTitle(it) }
}
}

Expand Down Expand Up @@ -177,7 +177,7 @@ class DetailFragment : BaseFragment(), Injectable {
class InnerDialogFragment : androidx.fragment.app.DialogFragment() {

override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val builder = AlertDialog.Builder(activity!!)
val builder = AlertDialog.Builder(requireActivity())
builder.setMessage(R.string.un_install_xunlei_label).setPositiveButton(R.string.ok, null)
return builder.create()
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/bzh/dytt/vo/MovieDetail.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import android.os.Parcelable
data class MovieDetail(
val id: Int,
var categoryId: Int,
val name: String,
val publishTime: String,
val name: String?,
val publishTime: String?,
val homePicUrl: String?,
val pics: String?,
val downloadUrl: String?,
Expand Down
8 changes: 3 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

buildscript {

ext.kotlin_version = '1.3.61'

repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.3.4'
}
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Feb 04 09:24:17 CST 2020
#Mon Mar 29 17:40:46 CST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
4 changes: 2 additions & 2 deletions key/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 27
compileSdkVersion 29

defaultConfig {
minSdkVersion 19
targetSdkVersion 27
targetSdkVersion 29
versionCode 1
versionName "1.0"

Expand Down

0 comments on commit 8f56538

Please sign in to comment.