【笔记】Android Gradle Plugin配置文件相关说明-libs.versions.toml

版本号

文件路径:Project\gradle\libs.versions.toml

直接搜索versions.agp是找不到的,这是变量引用的写法,查询 agp版本可以直接查版本号。

复制代码
[versions]
agp = "8.5.0-alpha08"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.10.0"
constraintlayout = "2.1.4"
navigationFragment = "2.6.0"
navigationUi = "2.6.0"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }

libs.versions.toml 文件是一个用来集中管理项目依赖版本的配置文件,这是Gradle 7及更高版本中引入的一个新功能,部分基于版式文件(Version Catalogs)的概念。

该文件允许在一个单独的文件中定义所有的依赖库以及它们的版本号,这样做的目的是为了简化和集中管理项目中的依赖,使得依赖版本的更新和维护变得更加直观和便捷。

  • [versions] 部分定义了项目中用到的所有库的版本号。
  • [libraries] 部分定义了依赖项的坐标以及它们所引用的版本。
  • [plugins] 部分允许定义Gradle插件及其版本。
相关推荐
kfepiza18 小时前
`modprobe`命令 与 `KVM`模块 笔记251006
linux·笔记
旷野说19 小时前
Android Studio Narwhal 3 特性
android·ide·android studio
小秋学嵌入式-不读研版19 小时前
C56-字符串拷贝函数strcpy与strnpy
c语言·开发语言·笔记
晨非辰1 天前
《剑指Offer:单链表操作入门——从“头删”开始破解面试》
c语言·开发语言·数据结构·c++·笔记·算法·面试
悠哉悠哉愿意1 天前
【ROS2学习笔记】 TF 坐标系
笔记·学习·ros2
maki0771 天前
VR大空间资料 01 —— 常用VR框架对比
android·ue5·游戏引擎·vr·虚幻·pico
li星野1 天前
打工人日报#20251005
笔记·程序人生·fpga开发·学习方法
xhBruce1 天前
InputReader与InputDispatcher关系 - android-15.0.0_r23
android·ims
领创工作室1 天前
安卓设备分区作用详解-测试机红米K40
android·java·linux
hello_ludy1 天前
Android 中的 mk 和 bp 文件编译说明
android·编译