-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add maven-publish.gradle to enable publishing to GitLab
- Loading branch information
1 parent
d06adcc
commit 8c14c1b
Showing
2 changed files
with
38 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
subprojects { sub -> | ||
|
||
if (sub.name in publishedProjects) { | ||
apply plugin: 'maven-publish' | ||
|
||
publishing { | ||
publications { | ||
jar(MavenPublication) { | ||
from components.java | ||
} | ||
|
||
} | ||
repositories { | ||
def secpJdkGitLabProjectId = "55956336" | ||
maven { | ||
url "https://gitlab.com/api/v4/projects/${secpJdkGitLabProjectId}/packages/maven" | ||
name "GitLab" | ||
credentials(HttpHeaderCredentials) { | ||
name = 'Private-Token' | ||
value = project.findProperty("gitLabMavenToken") | ||
} | ||
authentication { | ||
header(HttpHeaderAuthentication) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |