-
Notifications
You must be signed in to change notification settings - Fork 1
/
gradle-mvn-push.gradle
43 lines (40 loc) · 1.44 KB
/
gradle-mvn-push.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
apply plugin: 'maven-publish'
afterEvaluate {
publishing {
publications {
maven_aar_with_source(MavenPublication) {
from components.java
groupId POM_GROUP
artifactId POM_ARTIFACT_ID
version POM_VERSION_NAME
// artifact(jar)
// artifact(source: file(project.buildDir.path + "/outputs/jar/" + "${project.name}-${buildTypeName}.jar"), extension: 'jar') {
// builtBy jarPackage
// }
pom {
name = POM_NAME
packaging = POM_PACKAGING
description = POM_DESCRIPTION
url = POM_URL
inceptionYear = POM_INCEPTION_YEAR
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'linxueyuan'
name = 'Lin Xueyuan'
email = '[email protected]'
}
}
}
}
}
repositories {
maven { url "file://${gradle.ext.localMavenDir.absolutePath}" }
}
}
}