This repository was archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
126 lines (110 loc) · 4.26 KB
/
build.gradle
File metadata and controls
126 lines (110 loc) · 4.26 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
/*
* Copyright (c) 2022 Linus Andera
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
plugins {
id 'java'
id 'maven-publish'
id 'signing'
}
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_11
archivesBaseName = 'lapi-annotation-processor'
version = '1.0.1'
compileJava.options.encoding = 'UTF-8'
repositories {
mavenCentral()
}
dependencies {
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
options.encoding = 'UTF-8'
}
publishing {
repositories {
maven {
if(project.hasProperty("ossrhUsername") && project.hasProperty("ossrhPassword")){
name = "OSSRH"
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = ossrhUsername
password = ossrhPassword
}
project.logger.lifecycle("OSSRH username and password given. CAN deploy.")
}else {
project.logger.lifecycle("no OSSRH username and password given. CANNOT deploy.")
}
}
maven {
if(project.hasProperty("githubUsername") && project.hasProperty("githubToken")){
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/lni-dev/lapi-annotation-processor")
credentials {
username = githubUsername
password = githubToken
}
project.logger.lifecycle("github username and token given. CAN publish package.")
}else {
project.logger.lifecycle("no github username and token given. CANNOT publish package.")
}
}
}
publications {
annoProcessor(MavenPublication) {
artifactId = project.archivesBaseName
from components.java
pom {
name = 'LApi Annotation Processor'
description = 'Annotation Processor for LApi'
url = 'https://lni-dev.github.io/'
groupId = 'io.github.lni-dev'
version = project.version
licenses {
license {
name = 'GNU Affero General Public License v3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.txt'
}
}
developers {
developer {
id = 'linusdev'
name = 'Linus Andera'
email = 'einsuperlinus@gmail.com'
organizationUrl = 'https://lni-dev.github.io/'
}
}
scm {
connection = 'scm:git:git://github.com/lni-dev/lapi-annotation-processor.git'
developerConnection ='scm:git:ssh://github.com:lni-dev/lapi-annotation-processor.git'
url = 'http://github.com/lni-dev/lapi-annotation-processor/tree/master'
}
}
}
}
}
signing {
if(project.hasProperty("signing.keyId") && project.hasProperty("signing.password") && project.hasProperty("signing.secretKeyRingFile")){
sign publishing.publications.annoProcessor
project.logger.lifecycle("Signing information given. SIGNING.")
}else {
project.logger.lifecycle("No Signing information given. CANNOT sign.")
}
}