Skip to content

Commit b38e1e6

Browse files
committed
lib update
1 parent fd04042 commit b38e1e6

File tree

9 files changed

+50
-80
lines changed

9 files changed

+50
-80
lines changed

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ configurations.all {
136136
dependencies {
137137
implementation fileTree(include: ['*.jar'], dir: 'libs')
138138
implementation fileTree(include: ['*.aar'], dir: 'libs')
139-
implementation 'com.google.code.gson:gson:2.11.0'
139+
implementation 'com.google.code.gson:gson:2.13.1'
140140
implementation "androidx.appcompat:appcompat:${ext.androidx_appcompat}"
141141
implementation "com.google.android.material:material:${ext.androidx_material}"
142142
implementation 'com.orhanobut:logger:2.2.0'
@@ -146,7 +146,7 @@ dependencies {
146146
implementation "androidx.cardview:cardview:1.0.0"
147147
implementation "com.github.bumptech.glide:glide:$ext.glide"
148148
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.14'
149-
implementation 'com.squareup.okio:okio:3.9.1'
149+
implementation 'com.squareup.okio:okio:3.11.0'
150150
implementation 'androidx.multidex:multidex:2.0.1'
151151
implementation 'androidx.vectordrawable:vectordrawable:1.2.0'
152152
implementation "androidx.constraintlayout:constraintlayout:$constraint_layout"
@@ -158,8 +158,8 @@ dependencies {
158158
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
159159
kapt 'com.jakewharton:butterknife-compiler:10.2.3'
160160
implementation 'com.facebook.stetho:stetho:1.6.0'
161-
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
162-
implementation 'com.airbnb.android:lottie:6.6.2'
161+
implementation 'androidx.dynamicanimation:dynamicanimation:1.1.0'
162+
implementation 'com.airbnb.android:lottie:6.6.6'
163163
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
164164
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.14'
165165
implementation 'net.sourceforge.streamsupport:streamsupport:1.7.4'
@@ -168,7 +168,7 @@ dependencies {
168168
kapt "com.alibaba:arouter-compiler:$ext.arouter_compiler"
169169

170170
implementation "androidx.palette:palette-ktx:1.0.0"
171-
implementation 'com.tencent:mmkv:2.0.2'
171+
implementation 'com.tencent:mmkv:2.2.1'
172172

173173
testImplementation 'junit:junit:4.13.2'
174174
androidTestImplementation 'androidx.test:runner:1.6.2'
@@ -177,7 +177,7 @@ dependencies {
177177
implementation 'com.jakewharton.hugo:hugo-runtime:1.2.1'
178178

179179

180-
implementation 'com.facebook.fresco:fresco:3.5.0'
180+
implementation 'com.facebook.fresco:fresco:3.6.0'
181181
implementation 'com.github.chrisbanes:PhotoView:2.1.4'
182182
implementation 'com.github.REBOOTERS:Matisse:v0.6.0'
183183
implementation 'com.guolindev.permissionx:permissionx:1.8.1'
@@ -189,7 +189,7 @@ dependencies {
189189
implementation 'com.github.yhaolpz:FloatWindow:1.0.9'
190190

191191
// https://github.com/skydoves/TransformationLayout
192-
implementation 'com.github.skydoves:transformationlayout:1.1.4'
192+
implementation 'com.github.skydoves:transformationlayout:1.1.5'
193193

194194

195195
if (!imitate_isApp.toBoolean()) {

buildSrc/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ dependencies {
77
// groovy sdk
88
implementation gradleApi()
99
// implementation localGroovy()
10-
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.1.0'
10+
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.1.20'
1111
// 添加了这个,就可以看 Android Gradle 插件的源码了
1212
implementation 'com.android.tools.build:gradle-api:8.9.2'
1313
// implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.3.40"
14-
implementation 'com.google.code.gson:gson:2.11.0'
15-
implementation 'com.android.tools:common:31.7.3'
16-
implementation 'commons-io:commons-io:2.18.0'
14+
implementation 'com.google.code.gson:gson:2.13.1'
15+
implementation 'com.android.tools:common:31.9.2'
16+
implementation 'commons-io:commons-io:2.19.0'
1717
// implementation 'org.ow2.asm:asm:7.0'
18-
implementation 'org.ow2.asm:asm-commons:9.7'
19-
implementation('org.ow2.asm:asm-util:9.7.1')
18+
implementation 'org.ow2.asm:asm-commons:9.8'
19+
implementation('org.ow2.asm:asm-util:9.8')
2020
}
2121

2222
repositories {

config.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ ext {
55
targetSdk = 35
66

77

8-
support_version = '1.3.2'
8+
support_version = '1.4.0'
99
androidx_appcompat = '1.7.0'
1010
androidx_material = '1.12.0'
1111
androidx_preference = '1.2.1'
12-
constraint_layout = '2.2.0'
13-
core_ktx = '1.15.0'
12+
constraint_layout = '2.2.1'
13+
core_ktx = '1.16.0'
1414

1515
kotlin_version = '2.0.0'
1616
gradle_version = '8.1.1'
@@ -25,10 +25,10 @@ ext {
2525
rxjava = '2.2.2'
2626
rxandroid = '2.1.0'
2727

28-
roomVersion = '2.6.1'
28+
roomVersion = '2.7.1'
2929
roomVersion_runtime = '2.6.1'
3030
archLifecycleVersion = '2.2.0'
3131

3232
kotlin_coroutines = '1.10.1'
33-
kotlin_coroutines_android = '1.10.1'
33+
kotlin_coroutines_android = '1.10.2'
3434
}

gradle/libs.versions.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[versions]
22
agp = "8.7.0"
33
kotlin = "2.0.0"
4-
coreKtx = "1.15.0"
4+
coreKtx = "1.16.0"
55
junit = "4.14-SNAPSHOT"
66
junitVersion = "1.2.1"
77
espressoCore = "3.6.1"
88
lifecycleRuntimeKtx = "2.8.7"
9-
activityCompose = "1.9.3"
10-
composeBom = "2024.12.01"
9+
activityCompose = "1.10.1"
10+
composeBom = "2025.04.01"
1111
coilCompose = "2.7.0"
12-
composeRuntimeLiveData= "1.7.6"
12+
composeRuntimeLiveData= "1.8.0"
1313
accompanistPager = "0.36.0"
1414
lifecycleViewmodelCompose = "2.8.7"
1515
kotlinVersion = "2.0.21"

imitate/build.gradle

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ dependencies {
144144

145145

146146
testImplementation 'junit:junit:4.13.2'
147-
androidTestImplementation 'androidx.test:runner:1.6.0-rc01'
147+
androidTestImplementation 'androidx.test:runner:1.6.2'
148148
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
149149

150150

@@ -158,8 +158,8 @@ dependencies {
158158
exclude group: 'com.facebook.fresco', module: 'memory-type-native'
159159
exclude group: 'com.facebook.fresco', module: 'imagepipeline-native'
160160
}
161-
implementation 'com.facebook.fresco:animated-webp:3.2.0'
162-
implementation 'com.facebook.fresco:webpsupport:3.2.0'
161+
implementation 'com.facebook.fresco:animated-webp:3.6.0'
162+
implementation 'com.facebook.fresco:webpsupport:3.6.0'
163163
implementation 'com.github.REBOOTERS:Matisse:v0.6.0'
164164
// implementation fileTree(include: ['matisse-release.aar'], dir: 'libs')
165165
implementation 'com.guolindev.permissionx:permissionx:1.8.1'
@@ -172,7 +172,7 @@ dependencies {
172172
implementation 'com.github.andrefrsousa:SuperBottomSheet:1.3.0'
173173

174174
implementation 'de.hdodenhof:circleimageview:3.1.0'
175-
implementation 'androidx.viewpager:viewpager:1.0.0'
175+
implementation 'androidx.viewpager:viewpager:1.1.0'
176176

177177
implementation 'com.afollestad:assent:2.3.1'
178178

@@ -183,11 +183,11 @@ dependencies {
183183
implementation 'com.github.prostory:AndroidZdog:v1.0.0'
184184

185185
// robolectric
186-
testImplementation 'androidx.test:core:1.5.0'
186+
testImplementation 'androidx.test:core:1.6.1'
187187
testImplementation 'androidx.test:rules:1.6.1'
188188
testImplementation 'androidx.test.espresso:espresso-core:3.6.1'
189189
// testImplementation 'org.robolectric:robolectric:4.6.1'
190-
testImplementation 'com.facebook.soloader:soloader:0.11.0'
190+
testImplementation 'com.facebook.soloader:soloader:0.12.1'
191191
// robolectric
192192

193193
implementation group: 'commons-io', name: 'commons-io', version: '20030203.000550'
@@ -221,20 +221,20 @@ dependencies {
221221
implementation 'com.geyifeng.immersionbar:immersionbar:3.2.2'
222222

223223
// from 2021
224-
implementation 'com.github.skydoves:transformationlayout:1.1.4'
224+
implementation 'com.github.skydoves:transformationlayout:1.1.5'
225225
implementation 'com.beust:klaxon:5.6'
226226
implementation 'com.alibaba:fastjson:2.0.19.graal'
227227
implementation 'com.google.code.gson:gson:2.11.0'
228-
implementation 'com.google.dagger:dagger:2.54'
229-
kapt 'com.google.dagger:dagger-compiler:2.54'
228+
implementation 'com.google.dagger:dagger:2.56.2'
229+
kapt 'com.google.dagger:dagger-compiler:2.56.2'
230230

231231
// coroutines
232232
// 👇 依赖协程核心库
233233
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines"
234234
// 👇 依赖当前平台所对应的平台库
235235
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_android"
236236

237-
implementation 'io.github.scwang90:refresh-layout-kernel:2.1.0' //核心必须依赖
237+
implementation 'io.github.scwang90:refresh-layout-kernel:2.1.1' //核心必须依赖
238238
implementation 'io.github.scwang90:refresh-header-classics:2.1.0' //经典刷新头
239239
implementation 'io.github.scwang90:refresh-header-radar:2.1.0' //雷达刷新头
240240
implementation 'io.github.scwang90:refresh-header-falsify:2.1.1' //虚拟刷新头
@@ -243,7 +243,7 @@ dependencies {
243243
implementation 'io.github.scwang90:refresh-footer-ball:2.1.1' //球脉冲加载
244244
implementation 'io.github.scwang90:refresh-footer-classics:2.1.0' //经典加载
245245

246-
implementation 'androidx.metrics:metrics-performance:1.0.0-beta01'
246+
implementation 'androidx.metrics:metrics-performance:1.0.0-beta02'
247247

248248
implementation 'com.github.daquexian:FlexibleRichTextView:0.8.2'
249249
}

subs/ai/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ dependencies {
4747
implementation "androidx.core:core-ktx:${ext.core_ktx}"
4848
implementation "androidx.appcompat:appcompat:$ext.androidx_appcompat"
4949
implementation "com.google.android.material:material:${ext.androidx_material}"
50-
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
50+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
5151
testImplementation 'junit:junit:4.13.2'
5252
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
5353
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
5454

5555
// AndroidDraw Library
5656
implementation 'com.github.divyanshub024:AndroidDraw:v0.1'
57-
implementation('org.tensorflow:tensorflow-lite:2.16.1') {
57+
implementation('org.tensorflow:tensorflow-lite:2.17.0') {
5858
exclude group: "com.google.inject", module: "guice"
5959
}
6060
implementation 'com.google.android.gms:play-services-tasks:18.2.0'
6161

6262

63-
implementation 'org.pytorch:pytorch_android_lite:1.12.2'
64-
implementation 'org.pytorch:pytorch_android_torchvision_lite:1.12.2'
63+
implementation 'org.pytorch:pytorch_android_lite:2.1.0'
64+
implementation 'org.pytorch:pytorch_android_torchvision_lite:2.1.0'
6565
// implementation 'org.pytorch:pytorch_android:1.10.0'
6666
// implementation 'org.pytorch:pytorch_android_torchvision:1.10.0'
6767
}

subs/ai/src/main/java/com/engineer/ai/FastStyleTransActivity.kt

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ class FastStyleTransActivity : AppCompatActivity() {
4848
}
4949
viewBinding.gen.setOnClickListener {
5050
refreshLoading(true)
51-
// lifecycleScope.launch {
52-
// genImage()
53-
// }
5451
GlobalScope.launch {
5552
genImage()
5653
}
@@ -75,50 +72,25 @@ class FastStyleTransActivity : AppCompatActivity() {
7572

7673

7774
private fun genImage() {
78-
7975
currentBitmap?.let {
80-
// AsyncExecutor.fromIO().execute {
81-
// StyleTransferProcessor.initModule(module)
82-
// StyleTransferProcessor.transferStyle(it, 1.0f)
83-
// }.awaitResult<Bitmap>(onSuccess = {
84-
// Log.i(TAG, "onSuccess")
85-
// refreshLoading(false)
86-
// Log.i(TAG, "output ${it.width},${it.height}")
87-
// viewBinding.transResult.setImageBitmap(it)
88-
// }, onError = {
89-
// refreshLoading(false)
90-
// Log.i(TAG, it.stackTraceToString())
91-
// })
92-
9376
AsyncExecutor.fromIO().execute {
9477
StyleTransferProcessor.initModule(module)
95-
// val it = StyleTransferProcessor.transferStyle(it, 1.0f)
96-
//
97-
// withContext(Dispatchers.Main) {
98-
// refreshLoading(false)
99-
// Log.i(TAG, "output ${it.width},${it.height}")
100-
// viewBinding.transResult.setImageBitmap(it)
101-
// }
102-
103-
StyleTransferProcessor.transferStyleAsync(it, 0.5f) {
78+
StyleTransferProcessor.transferStyleAsync(it, 1.0f) {
10479
runOnUiThread {
10580
refreshLoading(false)
106-
10781
viewBinding.transResult.setImageBitmap(it)
10882
}
10983
}
11084
}
11185
}
112-
113-
11486
}
11587

11688
private fun initModel() {
11789
module = LiteModuleLoader.load(AndroidAssetsFileUtil.assetFilePath(this, modelName))
11890
}
11991

12092

121-
fun pickImage() {
93+
private fun pickImage() {
12294
// 检查设备是否支持照片选择器
12395
if (isPhotoPickerAvailable(this)) {
12496
pickMedia.launch(PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly))
@@ -128,16 +100,15 @@ class FastStyleTransActivity : AppCompatActivity() {
128100
}
129101
}
130102

131-
private val pickMedia =
132-
registerForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri ->
133-
// 处理选择的图片
134-
uri?.let {
135-
val inputStream = contentResolver.openInputStream(uri)
136-
val bitmap = BitmapFactory.decodeStream(inputStream)
137-
inputStream?.close()
138-
showBitmap(bitmap)
139-
}
103+
private val pickMedia = registerForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri ->
104+
// 处理选择的图片
105+
uri?.let {
106+
val inputStream = contentResolver.openInputStream(uri)
107+
val bitmap = BitmapFactory.decodeStream(inputStream)
108+
inputStream?.close()
109+
showBitmap(bitmap)
140110
}
111+
}
141112

142113
// 定义权限请求和图片选择启动器
143114
private val requestPermissionLauncher = registerForActivityResult(
@@ -191,8 +162,7 @@ class FastStyleTransActivity : AppCompatActivity() {
191162
this, permission
192163
) -> {
193164
// 解释为什么需要权限
194-
AlertDialog.Builder(this).setTitle("需要权限")
195-
.setMessage("需要存储权限才能从相册选择图片")
165+
AlertDialog.Builder(this).setTitle("需要权限").setMessage("需要存储权限才能从相册选择图片")
196166
.setPositiveButton("确定") { _, _ ->
197167
requestPermissionLauncher.launch(permission)
198168
}.setNegativeButton("取消", null).show()

subs/dataview/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
implementation fileTree(dir: 'libs', include: ['*.jar'])
3434

3535
implementation 'androidx.appcompat:appcompat:1.7.0'
36-
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
36+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
3737
testImplementation 'junit:junit:4.13.2'
3838
androidTestImplementation 'androidx.test:runner:1.6.2'
3939
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'

subs/game/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ dependencies {
4141
implementation "androidx.core:core-ktx:${ext.core_ktx}"
4242
implementation "androidx.appcompat:appcompat:$ext.androidx_appcompat"
4343

44-
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
44+
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
4545
implementation "androidx.lifecycle:lifecycle-extensions:$ext.archLifecycleVersion"
4646
testImplementation 'junit:junit:4.13.2'
4747
androidTestImplementation 'androidx.test.ext:junit:1.2.1'

0 commit comments

Comments
 (0)