Bootstrap

maven

mavenLocal()

  • 启用本地maven
pluginManagement {
    repositories {
        mavenLocal()
        ----------
        ----------
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenLocal()
        ----------
        ----------
    }
}
  • 安装jar依赖到本地Maven
mvn install:install-file \
    -Dfile=/home/chen/project/waterdog/app/libs/open_sdk_3.5.16.4_r8c01346_lite.jar \
    -DgroupId=com.tencent \
    -DartifactId=open-sdk-lite \
    -Dversion=3.5.16.4-r8c01346 \
    -Dpackaging=jar
  • 安装aar依赖到本地Maven
mvn install:install-file \
    -Dfile=/path/to/your/library.aar \
    -DgroupId=com.example \
    -DartifactId=library \
    -Dversion=1.0.0 \
    -Dpackaging=aar

  • 通过libs.versions.toml中应用
[versions]
tencentsdk = "3.5.16.4-r8c01346"
[libraries]
tencentsdk = { module = "com.tencent:open-sdk-lite", version.ref = "tencentsdk" }

build.gradle(:app)
dependencies {
	implementation libs.tencentsdk
}
  • 直接使用
build.gradle(:app)
dependencies {
	implementation 'com.tencent:open-sdk-lite:3.5.16.4-r8c01346'
}
;