-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathmvn_java.gradle
More file actions
38 lines (34 loc) · 1.04 KB
/
mvn_java.gradle
File metadata and controls
38 lines (34 loc) · 1.04 KB
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
29
30
31
32
33
34
35
36
37
38
apply plugin: 'maven'
//apply plugin: 'com.github.dcendents.android-maven'
repositories {
mavenCentral()
}
//for project dependency
project.group = GROUP_ID
project.version = COMPONENT_VERSION
task deploy <<{
}
deploy.dependsOn uploadArchives
uploadArchives {
def typePattern = ~"[0-9]\\.[0-9]\\.[0-9]\$"
def depolyTypeUrl
if(typePattern.matcher(COMPONENT_VERSION)){
println "warn ! find release version! will deploy release aar! version is $COMPONENT_VERSION "
depolyTypeUrl= deployUrl.replace("snapshots","releases")
}else {
depolyTypeUrl = deployUrl
}
// depolyTypeUrl= deployUrl.replace("snapshots","releases")
//println "depolyTypeUrl " + depolyTypeUrl
repositories.mavenDeployer {
repository(url: depolyTypeUrl) {
authentication(userName: deployUserName, password: deployPassword)
}
pom.project {
groupId GROUP_ID
artifactId POM_ARTIFACT_ID
packaging PACKAGE_FORMAT
version COMPONENT_VERSION
}
}
}