Update dependency

This commit is contained in:
Ash 2022-04-20 22:25:29 +08:00
parent 581c8243e3
commit 9c82890640
10 changed files with 123 additions and 107 deletions

View File

@ -1,14 +1,14 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "kotlin-kapt"
id "dagger.hilt.android.plugin"
id "androidx.navigation.safeargs.kotlin"
}
def gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
def gitCommitHash = "git rev-parse --verify --short HEAD".execute().text.trim()
def keyProps = new Properties()
def keyPropsFile = rootProject.file('ReadYouSecret/keystore.properties')
def keyPropsFile = rootProject.file("ReadYouSecret/keystore.properties")
if (keyPropsFile.exists()) {
println("Loading keystore properties from ${keyPropsFile.absolutePath}")
keyProps.load(new FileInputStream(keyPropsFile))
@ -31,17 +31,17 @@ android {
}
signingConfigs {
release {
keyAlias keyProps['keyAlias']
keyPassword keyProps['keyPassword']
storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null
storePassword keyProps['storePassword']
keyAlias keyProps["keyAlias"]
keyPassword keyProps["keyPassword"]
storeFile keyProps["storeFile"] ? file(keyProps["storeFile"]) : null
storePassword keyProps["storePassword"]
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
@ -58,70 +58,107 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
jvmTarget = "1.8"
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerExtensionVersion compose
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
implementation 'com.caverock:androidsvg-aar:1.4'
implementation 'com.github.ireward:compose-html:1.0.2'
implementation 'be.ceau:opml-parser:2.2.0'
implementation "androidx.profileinstaller:profileinstaller:1.2.0-alpha02"
implementation("io.coil-kt:coil-svg:2.0.0-rc03")
implementation("io.coil-kt:coil-compose:2.0.0-rc03")
implementation("androidx.compose.animation:animation-graphics:$compose_version")
implementation("com.google.accompanist:accompanist-flowlayout:0.24.3-alpha")
implementation("com.google.accompanist:accompanist-navigation-animation:0.24.3-alpha")
implementation "androidx.datastore:datastore-preferences:1.0.0"
implementation "com.airbnb.android:lottie-compose:4.2.2"
implementation "com.github.ireward:compose-html:1.0.2"
// http://bigbadaboom.github.io/androidsvg/release_notes.html
implementation "com.caverock:androidsvg-aar:$androidSVG"
// https://github.com/mdewilde/opml-parser
implementation "be.ceau:opml-parser:$opmlParser"
// https://github.com/dankito/Readability4J
implementation "net.dankito.readability4j:readability4j:$readability4j"
// https://github.com/muhrifqii/ParseRSS/releases
implementation "com.github.muhrifqii.ParseRSS:parserss:$parseRSS"
implementation "com.github.muhrifqii.ParseRSS:retrofit:$parseRSS"
// https://coil-kt.github.io/coil/changelog/
implementation("io.coil-kt:coil-compose:$coil")
implementation("io.coil-kt:coil-svg:$coil")
// https://square.github.io/okhttp/changelogs/changelog/
implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.6"
implementation "com.squareup.retrofit2:retrofit:$retrofit2"
implementation "com.squareup.retrofit2:converter-gson:$retrofit2"
// https://developer.android.com/jetpack/androidx/releases/profileinstaller
implementation "androidx.profileinstaller:profileinstaller:$profileinstaller"
// https://developer.android.com/jetpack/androidx/releases/work
implementation "androidx.work:work-runtime-ktx:$work"
// https://developer.android.com/jetpack/androidx/releases/datastore
implementation "androidx.datastore:datastore-preferences:$datastore"
// https://developer.android.com/jetpack/androidx/releases/room
implementation "androidx.room:room-paging:$room"
implementation "androidx.room:room-common:$room"
implementation "androidx.room:room-ktx:$room"
kapt "androidx.room:room-compiler:$room"
// https://developer.android.com/jetpack/androidx/releases/paging
implementation "androidx.paging:paging-common:$paging"
implementation "androidx.paging:paging-runtime:$paging"
implementation "androidx.paging:paging-compose:1.0.0-alpha14"
// https://developer.android.com/jetpack/androidx/releases/navigation
implementation "androidx.navigation:navigation-compose:$navigation"
// https://developer.android.com/jetpack/androidx/releases/lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle"
// https://developer.android.com/jetpack/androidx/releases/compose-material3
implementation "androidx.compose.material3:material3:$material3"
// https://github.com/google/accompanist/releases
implementation "com.google.accompanist:accompanist-insets:$accompanist"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist"
implementation "com.google.accompanist:accompanist-pager:$accompanist"
implementation "com.google.accompanist:accompanist-flowlayout:$accompanist"
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist"
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist"
// https://developer.android.com/jetpack/androidx/releases/compose-animation
implementation "androidx.compose.animation:animation-graphics:$compose"
// https://developer.android.com/jetpack/androidx/releases/compose-ui
implementation "androidx.compose.ui:ui:$compose"
// https://developer.android.com/jetpack/androidx/releases/compose-material
implementation "androidx.compose.material:material:$compose"
implementation "androidx.compose.material:material-icons-extended:$compose"
implementation "androidx.compose.ui:ui-tooling-preview:$compose"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose"
debugImplementation "androidx.compose.ui:ui-tooling:$compose"
// hilt
implementation "androidx.hilt:hilt-work:1.0.0"
implementation "androidx.work:work-runtime-ktx:2.8.0-alpha01"
implementation "net.dankito.readability4j:readability4j:1.0.8"
implementation "androidx.navigation:navigation-compose:2.5.0-alpha01"
implementation "com.google.dagger:hilt-android:2.40.5"
kapt "com.google.dagger:hilt-android-compiler:2.40.5"
implementation 'androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03'
kapt 'androidx.hilt:hilt-compiler:1.0.0'
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
kapt "androidx.hilt:hilt-compiler:1.0.0"
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
implementation 'com.google.accompanist:accompanist-swiperefresh:0.24.1-alpha'
implementation 'androidx.paging:paging-compose:1.0.0-alpha14'
implementation 'androidx.paging:paging-runtime:3.1.0'
implementation 'androidx.paging:paging-common:3.1.0'
implementation 'androidx.room:room-paging:2.4.1'
implementation 'androidx.room:room-common:2.4.1'
implementation 'androidx.room:room-ktx:2.4.1'
kapt "androidx.room:room-compiler:2.4.1"
implementation "com.github.muhrifqii.ParseRSS:parserss:0.4.0"
implementation "com.github.muhrifqii.ParseRSS:retrofit:0.4.0"
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.4'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation "com.google.accompanist:accompanist-insets:0.24.1-alpha"
implementation "com.google.accompanist:accompanist-systemuicontroller:0.24.1-alpha"
implementation 'com.google.accompanist:accompanist-pager:0.24.1-alpha'
implementation 'androidx.core:core-ktx:1.7.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.0-alpha01"
implementation "androidx.compose.material:material:1.2.0-alpha04"
implementation "androidx.compose.material3:material3:1.0.0-alpha07"
implementation "androidx.compose.material:material-icons-extended:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.3.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
// android
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.activity:activity-compose:1.4.0"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
}

View File

@ -1,26 +0,0 @@
package me.ash.reader.ui.component
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import com.airbnb.lottie.compose.LottieAnimation
import com.airbnb.lottie.compose.LottieCompositionSpec
import com.airbnb.lottie.compose.rememberLottieComposition
@Composable
fun LottieAnimation(
modifier: Modifier = Modifier,
url: String,
) {
val composition by rememberLottieComposition(
LottieCompositionSpec.Url(url)
)
LottieAnimation(
composition = composition,
modifier = modifier,
isPlaying = true,
restartOnPlay = true,
iterations = Int.MAX_VALUE,
)
}

View File

@ -2,14 +2,10 @@ package me.ash.reader.ui.component
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.TextFieldDefaults
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Close
import androidx.compose.material.icons.rounded.ContentPaste
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.remember
@ -40,14 +36,12 @@ fun TextField(
focusRequester.requestFocus()
}
androidx.compose.material.TextField(
TextField(
modifier = Modifier.focusRequester(focusRequester),
colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color.Transparent,
cursorColor = MaterialTheme.colorScheme.onSurface,
textColor = MaterialTheme.colorScheme.onSurface,
focusedIndicatorColor = MaterialTheme.colorScheme.primary,
),
maxLines = 1,
enabled = !readOnly,
value = value,
onValueChange = {
@ -56,7 +50,8 @@ fun TextField(
placeholder = {
Text(
text = placeholder,
color = MaterialTheme.colorScheme.outline.copy(alpha = 0.7f)
color = MaterialTheme.colorScheme.outline.copy(alpha = 0.7f),
style = MaterialTheme.typography.bodyMedium
)
},
isError = errorMessage.isNotEmpty(),

View File

@ -3,6 +3,7 @@ package me.ash.reader.ui.page.home
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.*
import androidx.compose.runtime.saveable.rememberSaveable
@ -10,7 +11,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.navigation.NavHostController
import com.google.accompanist.insets.statusBarsPadding
import com.google.accompanist.pager.ExperimentalPagerApi
import me.ash.reader.ui.component.ViewPager
import me.ash.reader.ui.ext.collectAsStateValue

View File

@ -4,7 +4,6 @@ import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.TextFieldDefaults
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.Close
import androidx.compose.material.icons.rounded.Search
@ -57,15 +56,13 @@ fun SearchBar(
contentDescription = stringResource(R.string.search),
tint = MaterialTheme.colorScheme.onSurfaceVariant,
)
androidx.compose.material.TextField(
TextField(
modifier = Modifier
.height(56.dp)
.fillMaxWidth()
.focusRequester(focusRequester),
colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color.Transparent,
cursorColor = MaterialTheme.colorScheme.onSurface,
textColor = MaterialTheme.colorScheme.onSurface,
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
),

View File

@ -24,7 +24,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import com.google.accompanist.insets.statusBarsPadding
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch

View File

@ -3,6 +3,7 @@ package me.ash.reader.ui.page.settings
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.*
@ -14,7 +15,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import com.google.accompanist.insets.statusBarsPadding
import me.ash.reader.R
import me.ash.reader.ui.component.Banner
import me.ash.reader.ui.component.DisplayText

View File

@ -16,7 +16,6 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import com.google.accompanist.insets.statusBarsPadding
import com.ireward.htmlcompose.HtmlText
import kotlinx.coroutines.launch
import me.ash.reader.R

View File

@ -1,6 +1,21 @@
buildscript {
ext {
compose_version = '1.2.0-alpha06'
compose = '1.2.0-alpha07'
accompanist = '0.24.6-alpha'
material3 = '1.0.0-alpha09'
lifecycle = '2.5.0-alpha06'
navigation = '2.5.0-alpha04'
paging = '3.1.1'
room = '2.5.0-alpha01'
datastore = '1.0.0'
work = '2.8.0-alpha02'
profileinstaller = '1.2.0-alpha02'
retrofit2 = '2.9.0'
coil = '2.0.0-rc03'
parseRSS = '0.5.0'
readability4j = '1.0.8'
opmlParser = '2.2.0'
androidSVG = '1.4'
}
dependencies {

View File

@ -1,6 +1,6 @@
#Sat Feb 05 00:02:40 CST 2022
#Wed Apr 20 21:38:37 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME