-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #1067
- Loading branch information
Showing
596 changed files
with
7,114 additions
and
4,602 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
|
||
plugins { | ||
id 'java-library' | ||
id 'com.diffplug.spotless' version '6.25.0' | ||
id 'signing' | ||
id 'maven-publish' | ||
id 'com.diffplug.spotless' version '6.25.0' apply false | ||
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' | ||
id 'net.researchgate.release' version '3.0.2' | ||
} | ||
|
@@ -12,58 +8,52 @@ wrapper { | |
gradleVersion = '7.6.2' | ||
} | ||
|
||
group = 'org.gitlab4j' | ||
|
||
dependencies { | ||
api 'jakarta.activation:jakarta.activation-api:2.1.1' | ||
api 'org.glassfish.jersey.inject:jersey-hk2:3.1.1' | ||
api 'org.glassfish.jersey.core:jersey-client:3.1.1' | ||
api 'org.glassfish.jersey.connectors:jersey-apache-connector:3.1.1' | ||
api 'org.glassfish.jersey.media:jersey-media-multipart:3.1.1' | ||
api 'org.glassfish.jersey.media:jersey-media-json-jackson:3.1.1' | ||
api 'jakarta.servlet:jakarta.servlet-api:6.0.0' | ||
testImplementation 'org.mockito:mockito-core:5.2.0' | ||
testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0' | ||
testImplementation 'org.hamcrest:hamcrest-all:1.3' | ||
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.2' | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.4" | ||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.4" | ||
} | ||
String groupId = 'org.gitlab4j' | ||
|
||
signing { | ||
useGpgCmd() | ||
sign(publishing.publications) | ||
} | ||
subprojects { | ||
apply plugin: 'java-library' | ||
apply plugin: 'signing' | ||
apply plugin: 'com.diffplug.spotless' | ||
apply plugin: 'maven-publish' | ||
|
||
tasks.withType(Sign) { | ||
onlyIf { | ||
project.hasProperty('signing.gnupg.keyName') | ||
group = groupId | ||
|
||
signing { | ||
useGpgCmd() | ||
sign(publishing.publications) | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
tasks.withType(Sign) { | ||
onlyIf { | ||
project.hasProperty('signing.gnupg.keyName') | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
|
||
compileJava.options.encoding = "UTF-8" | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(11) | ||
compileJava.options.encoding = "UTF-8" | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(11) | ||
} | ||
} | ||
} | ||
|
||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} | ||
spotless { | ||
java { | ||
palantirJavaFormat() | ||
importOrder 'java', 'javax', 'jakarta', 'org', 'com', '' | ||
removeUnusedImports() | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
repositories { | ||
// mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
spotless { | ||
java { | ||
palantirJavaFormat() | ||
importOrder 'java', 'javax', 'jakarta', 'org', 'com', '' | ||
removeUnusedImports() | ||
tasks.named('test') { | ||
useJUnitPlatform() | ||
} | ||
} | ||
|
||
|
@@ -78,51 +68,10 @@ nexusPublishing { | |
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'GitLab4J-API - GitLab API Java Client' | ||
description = 'GitLab4J-API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories and servers via the GitLab REST API.' | ||
packaging = 'jar' | ||
url = 'https://' + "$githubRepositoryOwner" + '.github.io/' + "$githubRepositoryName" + '/' | ||
licenses { | ||
license { | ||
name = 'The MIT License (MIT)' | ||
url = 'http://opensource.org/licenses/MIT' | ||
distribution = 'repo' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'gmessner' | ||
name = 'Greg Messner' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
id = 'gdesaintmartinlacaze' | ||
name = 'Gautier de Saint Martin Lacaze' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
url = 'https://github.com/orgs/' + "$githubRepositoryOwner" + '/people' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git' | ||
developerConnection = 'scm:git:https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git' | ||
url = 'https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '/' | ||
} | ||
} | ||
from components.java | ||
} | ||
} | ||
} | ||
|
||
release { | ||
buildTasks = ['doRelease'] | ||
git { | ||
requireBranch.set('6.x') | ||
requireBranch.set('main') | ||
} | ||
} | ||
|
||
|
@@ -147,13 +96,13 @@ def updateLastVersionValueTask = tasks.register('updateLastVersionValue') { | |
} | ||
} | ||
|
||
tasks.register('doRelease') { | ||
task doRelease { | ||
dependsOn( | ||
checkLastVersionValueTask, | ||
'initializeSonatypeStagingRepository', | ||
'clean', | ||
'build', | ||
project.getTasksByName('publishToSonatype', true) | ||
checkLastVersionValueTask, | ||
'initializeSonatypeStagingRepository', | ||
'clean', | ||
'build', | ||
project.getTasksByName('publishToSonatype', true) | ||
) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
dependencies { | ||
api project(':gitlab4j-models') | ||
api 'jakarta.activation:jakarta.activation-api:2.1.1' | ||
api 'org.glassfish.jersey.inject:jersey-hk2:3.1.1' | ||
api 'org.glassfish.jersey.core:jersey-client:3.1.1' | ||
api 'org.glassfish.jersey.connectors:jersey-apache-connector:3.1.1' | ||
api 'org.glassfish.jersey.media:jersey-media-multipart:3.1.1' | ||
api 'org.glassfish.jersey.media:jersey-media-json-jackson:3.1.1' | ||
api 'jakarta.servlet:jakarta.servlet-api:6.0.0' | ||
testImplementation 'org.mockito:mockito-core:5.2.0' | ||
testImplementation 'org.mockito:mockito-junit-jupiter:5.2.0' | ||
testImplementation 'org.hamcrest:hamcrest-all:1.3' | ||
testImplementation 'uk.org.webcompere:system-stubs-jupiter:2.0.2' | ||
testImplementation "org.junit.jupiter:junit-jupiter-api:5.10.4" | ||
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.10.4" | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
pom { | ||
name = 'GitLab4J-API - GitLab API Java Client' | ||
description = 'GitLab4J-API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories and servers via the GitLab REST API.' | ||
packaging = 'jar' | ||
url = 'https://' + "$githubRepositoryOwner" + '.github.io/' + "$githubRepositoryName" + '/' | ||
licenses { | ||
license { | ||
name = 'The MIT License (MIT)' | ||
url = 'http://opensource.org/licenses/MIT' | ||
distribution = 'repo' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'gmessner' | ||
name = 'Greg Messner' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
id = 'gdesaintmartinlacaze' | ||
name = 'Gautier de Saint Martin Lacaze' | ||
email = '[email protected]' | ||
} | ||
developer { | ||
url = 'https://github.com/orgs/' + "$githubRepositoryOwner" + '/people' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git' | ||
developerConnection = 'scm:git:https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '.git' | ||
url = 'https://github.com/' + "$githubRepositoryOwner" + '/' + "$githubRepositoryName" + '/' | ||
} | ||
} | ||
from components.java | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.gitlab4j.api; | ||
|
||
/** | ||
* @deprecated use {@link org.gitlab4j.models.Constants} instead. | ||
*/ | ||
@Deprecated | ||
public interface Constants extends org.gitlab4j.models.Constants {} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.