Skip to content

Commit 146bd32

Browse files
committed
testing
1 parent ede849e commit 146bd32

1 file changed

Lines changed: 19 additions & 44 deletions

File tree

build.gradle

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import com.vanniktech.maven.publish.JavadocJar
2+
import com.vanniktech.maven.publish.SourcesJar
3+
import com.vanniktech.maven.publish.JavaLibrary
4+
15
plugins {
26
//Support for IntelliJ IDEA
37
//https://docs.gradle.org/current/userguide/idea_plugin.html
@@ -14,7 +18,7 @@ plugins {
1418
id "org.checkerframework" version "0.6.61"
1519

1620
// Plugin for publishing via the new Nexus API
17-
id "com.vanniktech.maven.publish" version "0.36.0"
21+
id "com.vanniktech.maven.publish" version "0.36.0" apply false
1822
}
1923

2024

@@ -44,6 +48,8 @@ subprojects {
4448

4549
apply plugin: "com.diffplug.spotless"
4650
apply plugin: "org.checkerframework"
51+
apply plugin: "com.vanniktech.maven.publish"
52+
//apply plugin: "maven-publish"
4753

4854
group = rootProject.group
4955
version = rootProject.version
@@ -131,7 +137,6 @@ subprojects {
131137
classpath = sourceSets.test.runtimeClasspath
132138
}
133139

134-
135140
test {
136141
// Before we switched to JUnit 5, we used JUnit 4 with a customized discovery of test class.
137142
// This discovery called AutoSuite and searched in the compiled classes. AutoSuite was
@@ -280,17 +285,22 @@ subprojects {
280285
// specific delimiter: normally just 'package', but spotless crashes for files in default package
281286
// (see https://github.com/diffplug/spotless/issues/30), therefore 'import' is needed. '//' is for files
282287
// with completely commented out code (which would probably better just be removed in future).
283-
if (project.name == 'recoder') {
284-
licenseHeaderFile("$rootDir/gradle/header-recoder", '(package|import|//)')
285-
} else {
286-
licenseHeaderFile("$rootDir/gradle/header", '(package|import|//)')
287-
}
288+
licenseHeaderFile("$rootDir/gradle/header", '(package|import|//)')
288289
}
289290
}
290291

291292
mavenPublishing {
293+
publishToMavenCentral()
294+
signAllPublications()
295+
296+
configure(new JavaLibrary(
297+
new JavadocJar.Javadoc(),
298+
new SourcesJar.Sources()
299+
))
300+
/* coordinates(it.group, it.name, it.version)
301+
292302
pom {
293-
name = projects.name
303+
name = it.name
294304
description = project.description
295305
url = 'https://key-project.org/'
296306
@@ -315,44 +325,9 @@ subprojects {
315325
url = 'https://github.com/keyproject/key/'
316326
}
317327
}
318-
319-
repositories {
320-
maven {
321-
name = "LOCAL"
322-
url= uri("$rootDir/local")
323-
}
324-
325-
maven { // deployment to git.key-project.org/key-public/key
326-
name = "KEYLAB"
327-
url = uri("https://git.key-project.org/api/v4/projects/35/packages/maven")
328-
credentials(HttpHeaderCredentials) {
329-
def userToken = envOrPropertyValue("GITLAB_USER_TOKEN")
330-
def deployToken = envOrPropertyValue("GITLAB_DEPLOY_TOKEN")
331-
def ciToken = envOrPropertyValue("GITLAB_CIJOB_TOKEN")
332-
333-
if (userToken != "") {
334-
name = 'Private-Token'
335-
value = userToken
336-
} else if(deployToken != "") {
337-
name = 'Deploy-Token'
338-
value = deployToken
339-
} else {
340-
name = 'Job-Token'
341-
value = ciToken
342-
}
343-
}
344-
authentication {
345-
header(HttpHeaderAuthentication)
346-
}
347-
}
348-
}
349-
}
328+
*/ }
350329
}
351330

352-
mavenPublishing {
353-
publishToMavenCentral(true)
354-
signAllPublications()
355-
}
356331

357332
tasks.register('start'){
358333
description = "Use :key.ui:run instead"

0 commit comments

Comments
 (0)