-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
38 lines (34 loc) · 1.47 KB
/
build.gradle
File metadata and controls
38 lines (34 loc) · 1.47 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
dependencies {
testCompile 'junit:junit:4.11'
}
//Example using the maven-publish plugin. See http://www.gradle.org/docs/current/userguide/publishing_maven.html for more information
//Run 'gradle publish' to publish
apply plugin: 'maven-publish'
publishing {
publications {
mavenCustom(MavenPublication) {
groupId 'net.tklae.gradle.examples'
artifactId 'best-library-ever'
version '1.0'
pom.withXml {
def pomDefinition = asNode()
pomDefinition.appendNode('name', 'Best library ever!')
pomDefinition.appendNode('description', 'A library everyone should have, provides superb string manipulation functionality.')
pomDefinition.appendNode('url', 'https://github.com/tklae/gradle-examples')
pomDefinition.appendNode('inceptionYear', '2014')
def scmFragment = '''
<scm>
<url>https://github.com/tklae/gradle-examples</url>
<connection>scm:git://github.com/tklae/gradle-examples</connection>
<developerConnection>scm:git://github.com/tklae/gradle-examples</developerConnection>
</scm>'''
scmNode = new XmlParser(false, true).parseText(scmFragment)
pomDefinition.append(scmNode)
}
from components.java
}
}
repositories {
mavenLocal() //Only publish to local maven repository
}
}