Skip to content

Commit fe4f6ec

Browse files
wintmainwosys
authored andcommitted
[common][chore]Support kts script
minify debug(default) version. Bump app version as well.
1 parent 371cd9a commit fe4f6ec

File tree

5 files changed

+29
-26
lines changed

5 files changed

+29
-26
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ For personal study use only.
1313

1414
一款以Google/casa-log为框架来学习Android基础的App,在学习其他优秀的三方库中进行集成开发。仅供个人学习使用。
1515

16-
## Topics List[update here]
16+
## Topics List
1717

1818
* [AndroidRes](app-catalog/samples/androidres)
19-
* [Foundation](app-catalog/samples/foundation)
20-
* [ShadowLayout](app-catalog/samples/shadowlayout)
21-
* [Titlebar](app-catalog/samples/titlebar)
22-
* [Toaster](app-catalog/samples/toaster)
23-
* [Xperimissions](app-catalog/samples/xpermissions)
24-
* [Xplayer](app-catalog/samples/xplayer)
19+
* [wBasis](app-catalog/samples/wBasis)
20+
* [wNdk](app-catalog/samples/wNdk)
21+
* [wPermission](app-catalog/samples/wPermission)
22+
* [wPlayer](app-catalog/samples/wPlayer)
23+
* [wShadowLayout](app-catalog/samples/wShadowLayout)
24+
* [wTitlebar](app-catalog/samples/wTitlebar)
25+
* [wToaster](app-catalog/samples/wToaster)

app-catalog/app/build.gradle

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2022 Google LLC
3-
* Copyright 2023-2024 wintmain
3+
* Copyright 2023-2025 wintmain
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -27,21 +27,24 @@ plugins {
2727

2828
android {
2929
namespace 'com.wintmain.catalog.app'
30-
compileSdk 34
30+
compileSdk 35
3131

32+
// target -> Platform that needs to be adapted; compileSdk above can be ignored
33+
// Intuitive example, edge-to-edge starting from 35
3234
defaultConfig {
3335
applicationId "com.wintmain.catalog.app"
3436
minSdk 26
3537
targetSdk 34
36-
versionCode 20250101
37-
versionName 'V20250101'
38+
versionCode 20250601
39+
versionName 'V20250601'
3840

3941
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4042
}
4143

4244
buildTypes {
43-
release {
44-
minifyEnabled false
45+
debug {
46+
minifyEnabled true
47+
shrinkResources true
4548
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
4649
}
4750
}
@@ -92,7 +95,6 @@ dependencies {
9295
androidTestImplementation libs.androidx.test.ext.junit
9396
testImplementation libs.androidx.test.ext.junit
9497

95-
// App中集成CodeLocator: https://github.com/bytedance/CodeLocator
96-
// 暂时禁用
97-
// debugImplementation libs.codelocator.core
98+
// 暂时禁用 App中集成CodeLocator: https://github.com/bytedance/CodeLocator
99+
// debugImplementation libs.codelocator.core
98100
}

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright 2022 Google LLC
2-
# Copyright 2023-2024 wintmain
2+
# Copyright 2023-2025 wintmain
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

gradle/sample-build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ apply plugin: "com.google.devtools.ksp"
2424
apply plugin: 'dagger.hilt.android.plugin'
2525

2626
android {
27-
compileSdk 34
27+
compileSdk 35
2828

2929
defaultConfig {
3030
minSdk 26
3131
targetSdk 34
32-
versionCode 1
33-
versionName "1.0"
3432
}
3533

3634
compileOptions {

settings.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ include ':app-catalog:app'
2424
// Dynamically include samples under /app-catalog/samples/ folder
2525
def samples = []
2626
// Find all build.gradle files under samples folder
27-
settingsDir.traverse(nameFilter: "build.gradle") {
28-
def path = it.parent.substring(rootDir.path.length())
29-
def separator = File.separator
30-
if (path.contains("${separator}app-catalog${separator}samples${separator}")) {
31-
// convert the module path into gradle module notation
32-
samples.add(path.replaceAll(Matcher.quoteReplacement(separator), ":"))
27+
settingsDir.traverse {
28+
if (it.name == "build.gradle" || it.name == "build.gradle.kts") {
29+
def path = it.parent.substring(rootDir.path.length())
30+
def separator = File.separator
31+
if (path.contains("${separator}app-catalog${separator}samples${separator}")) {
32+
// convert the module path into gradle module notation
33+
samples.add(path.replaceAll(Matcher.quoteReplacement(separator), ":"))
34+
}
3335
}
3436
}
3537
// include all available samples and store it in the global variable.

0 commit comments

Comments
 (0)