Skip to content

Commit

Permalink
Update dependency
Browse files Browse the repository at this point in the history
* Update softprops/action-gh-release action to v2.2.0 (#103)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update all non-major dependencies (#104)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency

* Update dependency

* Update dependency gradle to v8.12

* Update dependency

* Update dependency

* Update dependency

* Update dependency

* Update dependency

* Update dependency

* Update dependency

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
lings03 and renovate[bot] committed Dec 20, 2024
1 parent ac1d8f8 commit a7c1cbb
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: ls -R app/build/outputs/apk/release/

- name: Create Release
uses: softprops/action-gh-release@v2.1.0
uses: softprops/action-gh-release@v2.2.0
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
Expand Down
14 changes: 3 additions & 11 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ android {
namespace = "top.laoxin.modmanager"
compileSdk = 35

ndkVersion = "28.0.12433566 rc1"

defaultConfig {
applicationId = "com.mod.manager"
minSdk = 28
Expand All @@ -51,16 +53,6 @@ android {
abiFilters.addAll(supportedAbis)
debugSymbolLevel = "FULL"
}

externalNativeBuild {
ndkBuild {
arguments += arrayOf(
"-DANDROID_STL=none",
"-DCMAKE_CXX_STANDARD=23",
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
)
}
}
}

buildTypes {
Expand Down Expand Up @@ -91,6 +83,7 @@ android {
buildConfig = true
compose = true
aidl = true
viewBinding = true
}

composeOptions {
Expand Down Expand Up @@ -119,7 +112,6 @@ kotlin {
"-Xjvm-default=all",
"-Xcontext-receivers",
"-Xwhen-guards",

"-opt-in=androidx.compose.foundation.layout.ExperimentalLayoutApi",
"-opt-in=androidx.compose.material3.ExperimentalMaterial3Api",
"-opt-in=androidx.compose.ui.ExperimentalComposeUiApi",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import android.os.Build
import android.os.Bundle
import android.os.FileObserver
import android.util.Log
import androidx.annotation.RequiresApi
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
Expand Down Expand Up @@ -59,7 +58,6 @@ import top.laoxin.modmanager.userservice.gamestart.ProjectSnowStartService
import top.lings.updater.Updater
import java.io.File


class ConsoleViewModel(
private val userPreferencesRepository: UserPreferencesRepository,
private val modRepository: ModRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ class ModViewModel(
private val backupRepository: BackupRepository
) : ViewModel(), ProgressUpdateListener, FlashObserverInterface {
private val _uiState = MutableStateFlow(ModUiState())
// val uiState: StateFlow<ModUiState> = _uiState.asStateFlow()
// val uiState: StateFlow<ModUiState> = _uiState.asStateFlow()

// 搜索框内容
//private val _searchText = mutableStateOf("")
// private val _searchText = mutableStateOf("")

private var _requestPermissionPath by mutableStateOf("")
val requestPermissionPath: String
Expand All @@ -76,13 +76,11 @@ class ModViewModel(
// 当前的虚拟路径
private var _currentPath by mutableStateOf("")

//当前研所包的文件列表
// 当前研所包的文件列表
private var _currentFiles by mutableStateOf(emptyList<File>())


// mod列表


// 扫描mod目录列表
// 从用户配置中读取mod目录
companion object {
Expand Down Expand Up @@ -120,8 +118,7 @@ class ModViewModel(
// 用户提示
private val userTips = userPreferencesRepository.getPreferenceFlow("USER_TIPS", true)


// 选择游戏`
// 选择游戏
private val selectedGame = userPreferencesRepository.getPreferenceFlow("SELECTED_GAME", 0)

// 扫描文件夹中的Mods
Expand Down Expand Up @@ -158,7 +155,6 @@ class ModViewModel(
viewModelScope, SharingStarted.WhileSubscribed(5000), UserPreferencesState()
)


val uiState: StateFlow<ModUiState> = combine(
userTips, _uiState
) { userTips, uiState ->
Expand All @@ -167,7 +163,6 @@ class ModViewModel(
viewModelScope, SharingStarted.WhileSubscribed(5000), ModUiState()
)


init {
Log.d("ModViewModel", "init: 初始化${userPreferences.value}")
//checkPermission()
Expand All @@ -184,10 +179,7 @@ class ModViewModel(
// 设置当前的视图
upDateCurrentModsView(it)
}

}


}

private fun upDateCurrentModsView(it: UserPreferencesState) {
Expand Down Expand Up @@ -1026,7 +1018,6 @@ class ModViewModel(
private fun getArchiveFiles(path: String) {
_currentZipPath = path
// 读取压缩包文件

val fileHeaders = ArchiveUtil.listInArchiveFiles(path)
// 拼接路径
val files = fileHeaders.map {
Expand Down Expand Up @@ -1056,10 +1047,8 @@ class ModViewModel(
_uiState.update { it -> it.copy(currentFiles = _currentFiles.filter { it.parent == currentPath }) }
}
}
///storage/emulated/0/Download/Mods/com.megagame.crosscore/圣歌.7z/圣歌 桃色乐境透
}


fun getModsByVirtualPathsStrict(path: String): List<ModBean> {
return _uiState.value.modList.filter { it.virtualPaths == path }
}
Expand All @@ -1073,8 +1062,4 @@ class ModViewModel(
it.copy(currentMods = mods)
}
}


}


24 changes: 16 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,33 @@
plugins {
alias(libs.plugins.androidApplication) apply false
alias(libs.plugins.jetbrainsKotlinAndroid) apply false
// id("com.android.library") version "8.1.4" apply false
// id("com.android.library") version "8.1.4" apply false
}

buildscript {

extra.apply {
set("room_version", "2.6.0")
}
/* dependencies {
val kotlin_version
classpath ("org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version")
/* dependencies {
val kotlin_version
classpath ("org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version")
}*/
dependencies {
classpath(libs.okhttp3.okhttp)
}
repositories{
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://jitpack.io") }
}

}


allprojects {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://jitpack.io") }
}
}
19 changes: 10 additions & 9 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[versions]
accompanistPager = "0.36.0"
accompanistPermissions = "0.36.0"
accompanistPermissions = "0.37.0"
accompanistSystemuicontroller = "0.36.0"
agp = "8.7.3"
shizuku = "13.1.5"
coilCompose = "2.7.0"
Expand All @@ -16,8 +17,8 @@ junit = "4.13.2"
kotlinxSerializationJson = "1.7.3"
activityCompose = "1.9.3"
lifecycleViewmodelCompose = "2.8.7"
navigationCompose = "2.8.4"
navigationRuntimeKtx = "2.8.4"
navigationCompose = "2.8.5"
navigationRuntimeKtx = "2.8.5"
okhttpVersion = "4.12.0"
provider = "13.1.5"
retrofit = "2.11.0"
Expand All @@ -29,18 +30,18 @@ xz = "1.10"
xZipJbindingXandroid = "Release-16.02-2.02"
zip4j = "2.11.5"
roomVersion = "2.6.1"
desugar = "2.1.3"
desugar = "2.1.4"
serialization = "2.1.0"
ksp = "2.1.0-1.0.29"
androidxRuntimeLivedata = "1.7.5"
androidxRuntimeRxjava2 = "1.7.5"
composeBom = "2024.11.00"
uiTestManifest = "1.7.5"
androidxRuntimeLivedata = "1.7.6"
androidxRuntimeRxjava2 = "1.7.6"
composeBom = "2024.12.01"
uiTestManifest = "1.7.6"

[libraries]
accompanist-pager = { module = "com.google.accompanist:accompanist-pager", version.ref = "accompanistPager" }
accompanist-permissions = { module = "com.google.accompanist:accompanist-permissions", version.ref = "accompanistPermissions" }
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanistPermissions" }
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanistSystemuicontroller" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-navigation-runtime-ktx = { group = "androidx.navigation", name = "navigation-runtime-ktx", version.ref = "navigationRuntimeKtx" }
androidx-rules = { group = "androidx.test", name = "rules", version.ref = "rules" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
3 changes: 1 addition & 2 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
18 changes: 1 addition & 17 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
pluginManagement {
repositories {
// maven { url = uri("https://jitpack.io") }
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()

}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://jitpack.io") }
}
}

rootProject.name = "Mod Manager"
include(":app")

0 comments on commit a7c1cbb

Please sign in to comment.