-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
120 lines (101 loc) · 2.96 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
108
109
110
111
112
113
114
115
116
117
118
119
120
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "http://repo.spring.io/plugins-release" }
}
dependencies {
classpath "jp.classmethod.aws:gradle-aws-plugin:0.41"
}
}
plugins {
id 'java-library'
id 'org.springframework.boot' version '2.1.5.RELEASE'
id 'com.jfrog.bintray' version '1.8.4'
id 'maven-publish'
id 'com.github.spotbugs' version '2.0.0' apply false
}
// basic plugins
apply plugin: 'io.spring.dependency-management'
// custom configuration
apply from: "${rootProject.projectDir}/gradle/version.gradle"
apply from: "${rootProject.projectDir}/gradle/sourceArtifact.gradle"
apply from: "${rootProject.projectDir}/gradle/bintray.gradle"
group = 'jp.xet'
ext.artifactId = "baseunits"
version = rootProject.version
// compiler
sourceCompatibility = targetCompatibility = 1.8
compileJava {
options.compilerArgs << "-Werror"
options.compilerArgs << "-Xlint:all" << "-Xlint:-processing" << "-Xlint:-deprecation"
}
repositories {
mavenCentral()
}
configurations {
testCompile {
extendsFrom compileOnly
}
}
dependencies {
implementation "org.slf4j:slf4j-api"
implementation "com.google.guava:guava:28.0-jre"
compileOnly "javax.validation:validation-api:1.0.0.GA"
compileOnly "org.springframework:spring-context"
compileOnly "org.hibernate:hibernate-core:3.6.7.Final"
compileOnly "com.miragesql:miragesql:2.1.0"
compileOnly "org.apache.wicket:wicket-core:1.5.17"
compileOnly "com.ibm.icu:icu4j:4.8.1.1"
compileOnly "com.amazonaws:aws-java-sdk-dynamodb:1.11.564"
compileOnly "com.fasterxml.jackson.core:jackson-core"
compileOnly "org.codehaus.jackson:jackson-core-asl:1.9.13"
compileOnly "org.codehaus.jackson:jackson-mapper-asl:1.9.13"
// lombok
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
testAnnotationProcessor 'org.projectlombok:lombok'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation "commons-io:commons-io:2.0"
}
bootJar {
enabled = false
}
jar {
enabled = true
}
wrapper {
gradleVersion = "5.4.1"
}
// ======== deploy ========
apply plugin: "jp.classmethod.aws"
aws {
profileName = null
}
publishing {
repositories {
maven {
def releasesRepoUrl = "${System.getenv("PUBLISH_REPOSITORY")}/release"
def snapshotsRepoUrl = "${System.getenv("PUBLISH_REPOSITORY")}/snapshot"
url version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
credentials(AwsCredentials) {
def profileName = project.hasProperty("awsProfileForMetropolisRepo") ? project.awsProfileForMetropolisRepo : null
def cred = aws.newCredentialsProvider(profileName).credentials
accessKey cred.getAWSAccessKeyId()
secretKey cred.getAWSSecretKey()
}
}
}
publications {
maven(MavenPublication) {
groupId project.group
artifactId project.artifactId
version project.version
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}