Coder Social home page Coder Social logo

quickbaselib's Introduction

   一个基于Gradle官方提供的API的统一版本依赖库和自己用的BaseLib

使用说明

Latest version

module VersionControlPlugin Language License
version Hex.pm

注意

官方文档

⚠️ Central declaration of dependencies is an incubating feature. It requires the activation of the VERSION_CATALOGS feature preview. ⚠️

⚠️ **依赖声明是一个孵化特性。它需要激活 VERSION_CATALOGS 功能预览. ⚠️

安装

添加远程仓库根据创建项目的 Gradle 版本有所不同 在Gradle7.6 以前 在项目根目录的 settings.gradle 添加

enableFeaturePreview("VERSION_CATALOGS")

在Gradle7.6+ 无需开启,默认为开启状态

然后在 项目根目录 的 settings.gradle 添加

dependencyResolutionManagement {
    versionCatalogs {
    	libs {
            from("io.github.chawloo:VersionControlPlugin:{version}")
        }
    }
}

如果采用kts的gradle文件,则如下:

enableFeaturePreview("VERSION_CATALOGS")

dependencyResolutionManagement {
    versionCatalogs {
        create("libs") {
            from("io.github.chawloo:VersionControlPlugin:{version}")
        }
    }
}

引入后就可以在module以及app模块中使用对应的依赖kts为例子。

android {
    compileSdk = libs.versions.compileSdk.get().toInt()
    defaultConfig {
        applicationId = "自己的包名"
        minSdk = libs.versions.minSdk.get().toInt()
        targetSdk = libs.versions.targetSdk.get().toInt()
    }
}

dependencies {
    api(libs.baseLib)
    kapt(libs.arouter.compiler)
}

说明

这个库平常自己应用于生产项目,放置了一些公司所有项目的公共依赖,想用可自行fork后增加即可,也可以提issue新增,另外版本也是经常会检查更新,升级为最新版本,如遇到适配问题请自行适配。

Feature

后续有时间整理一个清单以及更新说明,方便查看

License

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

http://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.

quickbaselib's People

Contributors

chawloo avatar

Stargazers

Mrduan avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.