详细使用方法及扩展功能,请参照 Wiki (开发前必看!!!)
适用于 Android 5.0 + (21 + API级别) 和 Java 11 +。
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
// sonatype
maven { url "https://s01.oss.sonatype.org/content/groups/public" }
maven { url "https://s01.oss.sonatype.org/content/repositories/releases" }
}
}
implementation 'com.gitee.tiamosu:jfly-core:1.2.6'
implementation 'com.gitee.tiamosu:jfly-navigation:1.2.6'
- 需排除本地或第三方依赖中的 navigation-fragment,防止与 NavHostFragment 修改版冲突,示例如下:
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3") {
exclude group: 'androidx.navigation', module: "navigation-fragment"
}
implementation 'com.gitee.tiamosu:jfly-viewbinding:1.2.6'
android {
buildFeatures {
viewBinding = true
dataBinding = true
}
}
dependencies {
//androidx
api Deps.appcompat
api Deps.fragment_ktx
api Deps.core_ktx
//lifecycle
api Deps.lifecycle_runtime_ktx
api Deps.lifecycle_livedata_ktx
api Deps.lifecycle_viewmodel_ktx
}
dependencies {
implementation project(path: ':fly-core')
api(Deps.navigation_fragment_ktx) {
exclude group: 'androidx.navigation', module: "navigation-fragment"
}
}
dependencies {
implementation project(path: ':fly-core')
implementation Deps.recyclerview
}
本框架已配置混淆,工程会自动传递混淆,使用时无需另行配置。
-
jfly-core: android-rules.pro
-
jfly-viewbinding:consumer-rules.pro