-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
162 lines (126 loc) · 3.67 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
buildscript {
repositories {
mavenCentral()
}
configurations.classpath {
// resolutionStrategy.activateDependencyLocking()
}
}
plugins {
id 'net.ltgt.apt-eclipse' version '0.21'
id 'eclipse'
id 'maven-publish'
}
version = project.hasProperty('versionId') ? project.property('versionId') : 'master'
group = 'io.zrz.jpgsql'
apply plugin: 'java-library'
apply plugin: 'net.ltgt.apt'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
jcenter()
}
wrapper {
gradleVersion = '6.7'
doLast {
delete "${projectDir}/gradlew.bat"
}
}
dependencyLocking {
// lockMode = LockMode.STRICT
// lockAllConfigurations()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
implementation enforcedPlatform('io.netty:netty-bom:4.1.54.Final')
implementation 'io.netty:netty-buffer'
implementation 'io.netty:netty-codec'
implementation 'io.netty:netty-handler'
implementation 'io.netty:netty-transport'
//
annotationProcessor 'org.immutables:value:2.8.8'
compileOnly 'org.immutables:value-annotations:2.8.8'
compileOnly group: 'org.eclipse.jdt', name: 'org.eclipse.jdt.annotation', version: '2.2.600'
//
api 'org.reactivestreams:reactive-streams:1.0.3'
api 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.postgresql:postgresql:42.2.18'
implementation 'com.google.guava:guava:30.0-jre'
api 'io.reactivex.rxjava3:rxjava:3.0.7'
implementation 'net.jodah:failsafe:2.4.0'
}
dependencies {
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
testImplementation 'org.slf4j:jul-to-slf4j:1.7.30'
testImplementation 'junit:junit:4.12'
}
task sourcesJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'sources'
}
publishing {
publications {
maven(MavenPublication) {
from components.java
groupId 'io.zrz.jpgsql'
artifactId 'jpgsql-client'
version project.version
}
}
}
task configureBuildship {
}
eclipse.synchronizationTasks project.rootProject.configureBuildship
project.afterEvaluate {
if (project.tasks.findByName('cleanEclipseFactorypath')) {
project.rootProject.tasks['configureBuildship'].dependsOn(
project.tasks['cleanEclipseFactorypath'],
project.tasks['cleanEclipseClasspath'],
project.tasks['cleanEclipseJdtApt'],
project.tasks['cleanEclipseJdt'],
project.tasks['eclipseFactorypath'],
project.tasks['eclipseJdt'],
project.tasks['eclipseJdtApt']
)
}
else if (project.tasks.findByName('eclipseFactorypath')) {
project.rootProject.tasks['configureBuildship'].dependsOn(
project.tasks['eclipseFactorypath'],
project.tasks['eclipseJdt'],
project.tasks['eclipseJdtApt']
)
}
project.eclipse {
project.name = createProjectDisplayName()
project.natures << 'org.eclipse.buildship.core.gradleprojectnature'
}
}
def createProjectDisplayName() {
if (project == project.rootProject) {
return project.name
}
return "${project.rootProject.name}${project.path}"
}
// ----
publishing {
publications {
mavenJava(MavenPublication) {
groupId = 'io.zrz.jpgsql'
artifactId = 'jpgsql-client'
version = project.version
from components.java
}
}
repositories {
maven {
url 'https://theo-test-460206009704.d.codeartifact.us-west-2.amazonaws.com/maven/theo-test/'
credentials {
username "aws"
password "/usr/local/bin/fcli sudo --account 460206009704 --role AWSAdministratorAccess aws codeartifact get-authorization-token --domain theo-test --domain-owner 460206009704 --query authorizationToken --output text".execute().text
}
}
}
}