Skip to main content

Posts

Showing posts from November, 2025

使用vanniktech 的插件上传库到 Maven Central Repository

  # MavenCentralRepositoryExample upload android aar to Maven Central Repository 发布 aar 到 Maven Central Repository 中央仓库 ## 1. 在项目 build.gradle.kts 添加下面信息 ` id("com.vanniktech.maven.publish") version "0.34.0" ` ``` kotlin // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.android.library) apply false id("com.vanniktech.maven.publish") version "0.34.0" } ``` ## 2. 在 gradle.properties 添加下面信息 ``` properties mavenCentralUsername=xxxxxxxx mavenCentralPassword=xxxxxxxxx signing.keyId=xxx signing.password=xxx signing.secretKeyRingFile=/xxx/yyyy/secring.gpg ``` ## 3. 在 library/build.gradle.kts 添加下面信息 ` id("com.vanniktech.maven.publish") version "0.34.0" ` ``` kotlin group = "io.github.chinavolvocars" version = "0.0.1" mavenPublishin...