Skip to content

Commit d7ff3d6

Browse files
authored
Update build.gradle
1 parent 76b0182 commit d7ff3d6

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

build.gradle

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,36 @@ subprojects {
147147
rootProject.dependencies.compile project
148148
}
149149
}
150+
publishing {
151+
publications {
152+
mavenJava(MavenPublication) {
153+
groupId = rootProject.group
154+
artifactId = "JavaBotBlockAPI"
155+
version = rootProject.version
156+
157+
from components.java
158+
artifact javadocJar
159+
artifact sourcesJar
160+
}
161+
}
162+
repositories {
163+
maven {
164+
url = "https://repo.codemc.io/repository/maven-releases/"
165+
166+
def mavenUsername = System.getenv("ORG_GRADLE_PROJECT_mavenUsername") ? System.getenv("ORG_GRADLE_PROJECT_mavenUsername") :
167+
System.getProperty("ORG_GRADLE_PROJECT_mavenUsername") ? System.getProperty("ORG_GRADLE_PROJECT_mavenUsername") : null
168+
def mavenPassword = System.getenv("ORG_GRADLE_PROJECT_mavenPassword") ? System.getenv("ORG_GRADLE_PROJECT_mavenPassword") :
169+
System.getProperty("ORG_GRADLE_PROJECT_mavenPassword") ? System.getProperty("ORG_GRADLE_PROJECT_mavenPassword") : null
170+
171+
if(mavenUsername != null && mavenPassword != null) {
172+
credentials {
173+
username = mavenUsername
174+
password = mavenPassword
175+
}
176+
}
177+
}
178+
}
179+
}
150180
}
151181

152182
configurations {
@@ -181,36 +211,6 @@ task sourcesJar(type: Jar, dependsOn: classes){
181211
destinationDirectory = file("$rootDir/build/libs/")
182212
}
183213

184-
publishing {
185-
publications {
186-
mavenJava(MavenPublication) {
187-
groupId = rootProject.group
188-
artifactId = "JavaBotBlockAPI"
189-
version = rootProject.version
190-
191-
from components.java
192-
artifact javadocJar
193-
artifact sourcesJar
194-
}
195-
}
196-
repositories {
197-
maven {
198-
url = "https://repo.codemc.io/repository/maven-releases/"
199-
200-
def mavenUsername = System.getenv("ORG_GRADLE_PROJECT_mavenUsername") ? System.getenv("ORG_GRADLE_PROJECT_mavenUsername") :
201-
System.getProperty("ORG_GRADLE_PROJECT_mavenUsername") ? System.getProperty("ORG_GRADLE_PROJECT_mavenUsername") : null
202-
def mavenPassword = System.getenv("ORG_GRADLE_PROJECT_mavenPassword") ? System.getenv("ORG_GRADLE_PROJECT_mavenPassword") :
203-
System.getProperty("ORG_GRADLE_PROJECT_mavenPassword") ? System.getProperty("ORG_GRADLE_PROJECT_mavenPassword") : null
204-
205-
if(mavenUsername != null && mavenPassword != null) {
206-
credentials {
207-
username = mavenUsername
208-
password = mavenPassword
209-
}
210-
}
211-
}
212-
}
213-
}
214214

215215
class Version{
216216
String major, minor, patch

0 commit comments

Comments
 (0)