-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
28 lines (25 loc) · 1.14 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
apply plugin: 'base' // To add "clean" task to the root project.
//apply plugin: 'java'
subprojects {
group = 'com.openle.module'
version = '1.0.0-SNAPSHOT'
repositories {
mavenCentral()
}
apply plugin: "java" // gradle内置了该plugin,无需写入plugins块儿。
apply plugin: "maven-publish" // 同上。
publishing {
repositories {
maven { // 解决withJavadocJar()上传超时:systemProp.org.gradle.internal.http.socketTimeout=300000
url "https://asia-northeast1-maven.pkg.dev/project-161922/maven-public-snapshot/"
credentials { // 重点:若配置了credentials.username则可去掉插件,将协议改为“https://...”即可。
// 编码key.json内容为base64后username改用_json_key_base64
username = "_json_key"
password = file('../../../../docs/cloud/project-161922-8ad030ce3d3e.json').text
}
authentication { basic(BasicAuthentication) }
}
}
publications { mainRelease(MavenPublication) { from(components.java) } }
}
}