-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
131 lines (112 loc) · 4.09 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
buildscript {
repositories {
google()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.14'
classpath 'com.github.nbaztec:coveralls-jacoco-gradle-plugin:1.2.6'
}
ext {
project_version = '2.1.0'
grpc_version = '1.34.0'
protobuf_version = '3.14.0'
javax_annotation_version = '1.3.1'
lombok_version = '1.18.16'
junit_version = '5.7.0'
jackson_version = '2.12.0'
commons_lang_version = '3.11'
slf4j_version = '1.7.30'
log4j2_version = '2.14.0'
}
}
group = 'games.mythical'
version = "${project_version}"
allprojects {
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'signing'
}
subprojects {
group = 'games.mythical'
version = "${project_version}"
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
dependencies {
implementation group: 'org.projectlombok', name: 'lombok', version: "${lombok_version}"
annotationProcessor group: 'org.projectlombok', name: 'lombok', version: "${lombok_version}"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: "${junit_version}"
testAnnotationProcessor group: 'org.projectlombok', name: 'lombok', version: "${lombok_version}"
}
publishing {
repositories {
maven {
name = 'GitHubPackages'
url = uri('https://maven.pkg.github.com/MythicalGames/ivi-sdk-java')
credentials {
username = project.findProperty('github.user') ?: System.getenv('GITHUB_USER')
password = project.findProperty('github.token') ?: System.getenv('GITHUB_TOKEN')
}
}
maven {
name = 'MavenCentral'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = project.findProperty('ossrhUsername')
password = project.findProperty('ossrhPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
pom {
name = 'IVI SDK'
description = 'The IVI integration SDK for Java game servers'
url = 'https://mythical.games'
from components.java
scm {
connection = 'https://github.com/MythicalGames/ivi-sdk-java.git'
developerConnection = 'https://github.com/MythicalGames/ivi-sdk-java.git'
url = 'https://github.com/MythicalGames/ivi-sdk-java.git'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'Keith Miller'
email = '[email protected]'
organization = 'Mythical Games'
organizationUrl = 'https://mythical.games'
}
}
}
}
}
}
tasks.withType(Sign) {
onlyIf { project.hasProperty('signingKey') && project.hasProperty('signingPassword') }
}
signing {
// switch to this and comment out the following line to test signing locally
// useGpgCmd()
useInMemoryPgpKeys(project.findProperty('signingKey'), findProperty('signingPassword'))
sign publishing.publications.mavenJava
}
}
task printVersionToFile {
doLast {
file("${rootDir}/version.txt").text = "${project.version}"
}
}