Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
b5c6b479
Commit
b5c6b479
authored
Jun 22, 2022
by
Benj
Browse files
Set up publishing to 4benj-maven for dev builds
parent
f331afe3
Changes
1
Hide whitespace changes
Inline
Side-by-side
build.gradle
View file @
b5c6b479
...
@@ -116,7 +116,7 @@ jar {
...
@@ -116,7 +116,7 @@ jar {
from
{
from
{
configurations
.
runtimeClasspath
.
collect
{
it
.
isDirectory
()
?
it
:
zipTree
(
it
)
}
configurations
.
runtimeClasspath
.
collect
{
it
.
isDirectory
()
?
it
:
zipTree
(
it
)
}
}
}
duplicatesStrategy
=
DuplicatesStrategy
.
INCLUDE
duplicatesStrategy
=
DuplicatesStrategy
.
INCLUDE
from
(
'src/main/java'
)
{
from
(
'src/main/java'
)
{
...
@@ -171,13 +171,23 @@ publishing {
...
@@ -171,13 +171,23 @@ publishing {
}
}
repositories
{
repositories
{
maven
{
maven
{
// change URLs to point to your repos, e.g. http://my.org/repo
if
(
version
.
endsWith
(
'-dev'
))
{
def
releasesRepoUrl
=
'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
println
(
"Publishing to 4benj-maven"
)
def
snapshotsRepoUrl
=
'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url
'https://repo.4benj.com/releases'
url
=
version
.
endsWith
(
'SNAPSHOT'
)
?
snapshotsRepoUrl
:
releasesRepoUrl
name
'4benj-maven'
credentials
{
name
=
'sonatype'
username
System
.
getenv
(
'benj_maven_username'
)
credentials
(
PasswordCredentials
)
password
System
.
getenv
(
'benj_maven_token'
)
}
}
else
{
println
(
"Publishing to sonatype"
)
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
name
=
'sonatype'
credentials
(
PasswordCredentials
)
}
}
}
}
}
}
}
...
@@ -225,7 +235,9 @@ eclipse {
...
@@ -225,7 +235,9 @@ eclipse {
}
}
signing
{
signing
{
sign
publishing
.
publications
.
mavenJava
if
(!
version
.
endsWith
(
'-dev'
))
{
sign
publishing
.
publications
.
mavenJava
}
}
}
javadoc
{
javadoc
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment