Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
p x
earlywarning
Commits
032bde60
Commit
032bde60
authored
Sep 03, 2025
by
p x
Browse files
测试发布插件
parent
9b886b4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
build.gradle.kts
View file @
032bde60
plugins
{
alias
(
libs
.
plugins
.
android
.
library
)
alias
(
libs
.
plugins
.
kotlin
.
android
)
id
(
"maven-publish"
)
id
(
"signing"
)
}
android
{
namespace
=
"com.cusc.adas.v2x"
compileSdk
=
35
...
...
@@ -46,6 +50,37 @@ android {
}
}
publishing
{
publications
{
register
<
MavenPublication
>(
"earlywarning"
)
{
groupId
=
"io.github.killcow"
artifactId
=
"earlywarning"
version
=
"1.0"
// afterEvaluate {
// from(components["java"])
// }
// 如果是Android库模块
artifact
(
layout
.
buildDirectory
.
dir
(
"outputs/aar/earlywarning-release.aar"
))
// 如果是Java库模块
// artifact("$buildDir/libs/your-library.jar")
//发布到本地仓库
repositories
{
maven
{
name
=
"MyRepo"
url
=
uri
(
layout
.
buildDirectory
.
dir
(
"repo"
))
}
}
}
}
}
// 配置签名(可选但推荐)
//signing {
// sign(publishing.publications["earlywarning"])
//}
dependencies
{
implementation
(
libs
.
androidx
.
core
.
ktx
)
implementation
(
libs
.
androidx
.
appcompat
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment