-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
98 lines (83 loc) · 2.36 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
buildscript {
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
dependencies {
classpath group:'org.carnival', name:'carnival-gradle', version:'2.1.0-SNAPSHOT'
}
}
plugins {
id "groovy"
id 'maven-publish'
id 'com.github.ManifestClasspath' version '0.1.0-RELEASE'
}
apply plugin: 'carnival.library'
version "0.1-SNAPSHOT"
group "org.carnival"
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
dependencies {
implementation("io.micronaut:micronaut-http-client:2.1.2")
}
java {
sourceCompatibility = JavaVersion.toVersion('11')
targetCompatibility = JavaVersion.toVersion('11')
}
test {
testLogging {
outputs.upToDateWhen {false}
showStandardStreams = true
}
}
///////////////////////////////////////////////////////////////////////////////
// maven publishing
///////////////////////////////////////////////////////////////////////////////
publishToMavenLocal.dependsOn 'compileGroovy'
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
from sourceSets.main.allGroovy
classifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
from groovydoc
classifier = 'javadoc'
}
publishing {
publications {
mavenGroovy(MavenPublication) {
artifactId = 'carnival-openspecimen'
from components.java
artifact sourcesJar
artifact javadocJar
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'Carnival OpenSpecimen'
description 'Core components for OpenSpecimen'
url 'https://github.com/pmbb-ibi/carnival-openspecimen'
developers {
developer {
id 'augustearth'
name 'David Birtwell'
email '[email protected]'
}
}
}
}
}
}
repositories {
maven {
// change URLs to point to your repos, e.g. http://my.org/repo
def releasesRepoUrl = "$buildDir/repos/releases"
def snapshotsRepoUrl = "$buildDir/repos/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
}
}
}