-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
107 lines (92 loc) · 3.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
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
97
98
99
100
101
102
103
104
105
106
107
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.21.RELEASE")
}
}
plugins {
id 'java'
id 'maven-publish'
id 'org.springframework.boot' version '1.5.21.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
}
group 'uk.ac.ebi.subs'
version '2.18.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
bootRepackage.enabled = false
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
implementation("com.fasterxml.jackson.core:jackson-databind:2.10.0")
compileOnly("org.projectlombok:lombok:1.18.10")
annotationProcessor 'org.projectlombok:lombok:1.18.10'
testCompile("org.springframework.boot:spring-boot-starter-test")
}
task jarWithAddedManifest(type: Jar) {
manifest {
attributes(
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Source-Compatibility': project.sourceCompatibility)
}
with jar
}
task sourceJar(type: Jar) {
archiveClassifier.set("sources")
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'subs-data-model'
pom {
name = 'subs-data-model'
description = 'Data Submission Portal - common library for data models'
url = 'https://github.com/EMBL-EBI-SUBS/subs-data-model'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'subs-internal'
name = 'EMBL-EBI-SUBS'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/EMBL-EBI-SUBS/subs-data-model.git'
developerConnection = 'scm:git:ssh://github.com/EMBL-EBI-SUBS/subs-data-model.git'
url = 'https://github.com/EMBL-EBI-SUBS/subs-data-model.git'
}
}
from components.java
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}