-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
132 lines (108 loc) · 3.52 KB
/
build.gradle
File metadata and controls
132 lines (108 loc) · 3.52 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
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
plugins {
id 'java'
id 'idea'
id 'maven'
}
repositories {
mavenCentral()
mavenLocal()
maven {
url = "https://maven.paube.de"
}
}
dependencies {
compile group: 'de.upb.codingpirates.battleships', name: 'logic', version: project.logic_version
implementation group: 'com.google.guava', name: 'guava', version: '28.2-jre'
implementation group: 'io.reactivex.rxjava2', name: 'rxjava', version: '2.1.1'
implementation group: 'com.google.inject', name: 'guice', version: '4.2.1'
implementation group: 'com.google.code.gson', name: 'gson', version: '2.7'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.0'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.5.2'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
test {
useJUnitPlatform()
testLogging {
//noinspection GrUnresolvedAccess
events "passed", "skipped", "failed"
}
}
task sourceJar(type: Jar, dependsOn: classes){
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourceJar
archives javadocJar
}
jar {
includeEmptyDirs = false
from sourceSets.main.output.classesDirs
from sourceSets.main.output.resourcesDir
manifest {
attributes 'Implementation-Title': 'Battleships Network',
'Implementation-Version': "${project.version}"
}
}
configurations {
deployerJars
}
dependencies {
deployerJars "org.apache.maven.wagon:wagon-ftp:2.9"
}
uploadArchives {
repositories {
add getProject().repositories.mavenLocal()
}
repositories.mavenDeployer {
configuration = configurations.deployerJars
logger.info('Publishing to files server')
if (project.hasProperty("maven_url")) {
repository(url: project.getProperty("maven_url")) {
authentication(userName: project.getProperty("maven_user"), password: project.getProperty("maven_password"))
}
} else {
repository(url: 'file://localhost/' + project.file('../../.m2/repository').getAbsolutePath())
}
pom {
groupId = project.group
version = project.version
artifactId = project.artifact
}
pom.project {
name project.archivesBaseName
packaging 'jar'
description 'network component of battleships'
url 'https://github.com/coding-pirates/network'
scm {
url 'https://github.com/coding-pirates/network'
connection 'scm:git:git://github.com/coding-pirates/network.git'
developerConnection 'scm:git:git@github.com:coding-pirates/network.git'
}
issueManagement {
system 'github'
url 'https://github.com/coding-pirates/network/issues'
}
developers {
developer {
id 'cheaterpaul'
name 'cheaterpaul'
roles { role 'developer' }
}
}
}
}
}
idea.module {
for (String excludeDirName in ["run", "build", "out", "logs", ".gradle", ".github"]) {
excludeDirs += new File(project.projectDir, excludeDirName)
}
}