Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app-catalog/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ dependencies {
// libs.androidx.testext 必须和上面的 runner 一起;AS自动创建的'androidTest'会用到
androidTestImplementation libs.androidx.test.ext.junit
testImplementation libs.androidx.test.ext.junit
testImplementation libs.junit

// 暂时禁用 App中集成CodeLocator: https://github.com/bytedance/CodeLocator
// debugImplementation libs.codelocator.core
Expand Down
32 changes: 31 additions & 1 deletion app-catalog/app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,34 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

-dontwarn com.google.common.collect.ArrayListMultimap
-dontwarn com.google.common.collect.Multimap
-dontwarn java.awt.Color
-dontwarn java.awt.Font
-dontwarn java.awt.Point
-dontwarn java.awt.Rectangle
-dontwarn javax.money.CurrencyUnit
-dontwarn javax.money.Monetary
-dontwarn javax.ws.rs.Consumes
-dontwarn javax.ws.rs.Produces
-dontwarn javax.ws.rs.core.Response
-dontwarn javax.ws.rs.core.StreamingOutput
-dontwarn javax.ws.rs.ext.MessageBodyReader
-dontwarn javax.ws.rs.ext.MessageBodyWriter
-dontwarn javax.ws.rs.ext.Provider
-dontwarn org.glassfish.jersey.internal.spi.AutoDiscoverable
-dontwarn org.javamoney.moneta.Money
-dontwarn org.joda.time.DateTime
-dontwarn org.joda.time.DateTimeZone
-dontwarn org.joda.time.Duration
-dontwarn org.joda.time.Instant
-dontwarn org.joda.time.LocalDate
-dontwarn org.joda.time.LocalDateTime
-dontwarn org.joda.time.LocalTime
-dontwarn org.joda.time.Period
-dontwarn org.joda.time.ReadablePartial
-dontwarn org.joda.time.format.DateTimeFormat
-dontwarn org.joda.time.format.DateTimeFormatter
-dontwarn springfox.documentation.spring.web.json.Json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2023-2025 wintmain
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.wintmain.catalog.app

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
2 changes: 1 addition & 1 deletion app-catalog/samples/wBasis/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies {
implementation libs.androidx.constraintlayout
implementation libs.androidx.activity.compose
implementation libs.casa.ui
implementation libs.androidx.recyclerviewExt
implementation libs.androidx.recyclerview
implementation libs.androidx.cardview
implementation libs.androidx.navigation.fragment
implementation libs.androidx.navigation.ui
Expand Down
7 changes: 7 additions & 0 deletions app-catalog/samples/wNet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# wNet

这个模块是集成网络库以及其使用。

Original Link:https://github.com/liangjingkanji/Net

[回到主页](../../../README.md)
99 changes: 99 additions & 0 deletions app-catalog/samples/wNet/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/*
* Copyright 2023-2025 wintmain
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
id("com.google.devtools.ksp")
id("kotlin-kapt")
}

android {
namespace = "com.wintmain.wNet"
compileSdk = 35

defaultConfig {
// sub模块只需要指定最小的sdk即可
minSdk = 26
}

buildFeatures {
dataBinding = true
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}

composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
}

dependencies {
val composeBom = platform(libs.compose.bom)
implementation(composeBom)
androidTestImplementation(composeBom)

implementation(libs.casa.base)
ksp(libs.casa.processor)

implementation(libs.hilt.android)
ksp(libs.hilt.compiler)

implementation(libs.androidx.coreExtkt)
implementation(libs.compose.foundation.foundation)
implementation(libs.compose.ui.ui)
implementation(libs.compose.material.material3)

// [customize] - 将common的依赖放到这里
implementation(libs.androidx.appcompat)
implementation(libs.material)

// Add from here
implementation(libs.androidx.coreExtkt)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.legacy.support.v4)
implementation(libs.androidx.recyclerview)
implementation(libs.material)
implementation(libs.androidx.navigation.fragment.ktx)
implementation(libs.androidx.navigation.ui.ktx)

// ------------------------------网络请求-------------------------------------
implementation(project(":app-catalog:samples:wNet:libwNet"))
implementation(libs.glide)
// ------------------------------JSON解析-------------------------------------
implementation(libs.kotlinx.serialization.json) // JSON序列化库, 首选推荐使用
implementation(libs.kotlinx.serialization.protobuf) // protobuf序列化
implementation("com.squareup.moshi:moshi-kotlin:1.14.0") // JSON序列化库, 强校验, JSON字段缺失会导致解析异常, 故不推荐
implementation(libs.kotlin.reflect.v2021)
implementation(libs.gson) // JSON序列化库, 会导致kotlin默认值无效, 故不推荐
implementation("com.alibaba:fastjson:1.2.73") // JSON序列化库, 会导致kotlin默认值无效(除非引入kt-reflect), 不推荐
// ------------------------------其他库-------------------------------------
implementation("com.github.liangjingkanji:StatusBar:2.0.2") // 透明状态栏
implementation("com.github.liangjingkanji:debugkit:1.3.0") // 开发调试窗口工具
implementation("com.github.liangjingkanji:Tooltip:1.2.2") // 吐司工具
implementation("com.github.liangjingkanji:Engine:0.0.74")
implementation("com.github.liangjingkanji:Serialize:3.0.1")
implementation("com.github.liangjingkanji:BRV:1.5.2") // 提供自动分页/缺省页/自动下拉刷新功能
implementation("com.github.chuckerteam.chucker:library:3.5.2") // 通知栏监听网络日志
implementation("com.squareup.okhttp3:mockwebserver:4.10.0")
//debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12")
}
51 changes: 51 additions & 0 deletions app-catalog/samples/wNet/libwNet/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2023-2025 wintmain
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

plugins {
id("com.android.library")
id("org.jetbrains.kotlin.android")
}

android {
namespace = "lib.wintmain.libwNet"
compileSdk = 35

defaultConfig {
minSdk = 26
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = "17"
freeCompilerArgs = listOf("-Xinline-classes", "-Xallow-result-return-type")
}
}

dependencies {
implementation(libs.androidx.appcompat)
implementation(libs.androidx.startup)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.documentfile)

compileOnly(libs.okhttp)
compileOnly("com.github.liangjingkanji:BRV:1.5.2")
compileOnly(libs.kotlinx.coroutines.core)
compileOnly(libs.kotlinx.coroutines.android)
}
37 changes: 37 additions & 0 deletions app-catalog/samples/wNet/libwNet/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2023-2025 wintmain
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ https://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="lib.wintmain.libwNet">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:networkSecurityConfig="@xml/network_security_config"
tools:targetApi="n">
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="lib.wintmain.libwNet.internal.NetInitializer"
android:value="androidx.startup" />
</provider>
</application>

</manifest>
Loading
Loading