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
c9299d84
Commit
c9299d84
authored
Apr 26, 2022
by
KingRainbow44
Browse files
Publish to Maven central
parent
e27bdd9b
Changes
1
Show whitespace changes
Inline
Side-by-side
build.gradle
View file @
c9299d84
...
...
@@ -12,11 +12,22 @@ plugins {
// Apply the application plugin to add support for building a CLI application
id
'application'
id
'maven-publish'
id
'signing'
}
group
=
'tech.xigam'
version
=
'1.0.0-dev'
sourceCompatibility
=
17
targetCompatibility
=
17
java
{
withJavadocJar
()
withSourcesJar
()
}
repositories
{
mavenCentral
()
}
...
...
@@ -64,3 +75,68 @@ jar {
destinationDir
=
file
(
"."
)
}
publishing
{
publications
{
mavenJava
(
MavenPublication
)
{
artifactId
=
'grasscutter'
from
components
.
java
versionMapping
{
usage
(
'java-api'
)
{
fromResolutionOf
(
'runtimeClasspath'
)
}
usage
(
'java-runtime'
)
{
fromResolutionResult
()
}
}
pom
{
name
=
'Grasscutter'
description
=
'A server software reimplementation for an anime game.'
url
=
'https://github.com/Grasscutters/Grasscutter'
licenses
{
license
{
name
=
'The Apache License, Version 2.0'
url
=
'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers
{
developer
{
id
=
'melledy'
name
=
'Melledy'
email
=
'melledy@xigam.tech'
// not a real email kek
}
developer
{
id
=
'magix'
name
=
'Magix'
email
=
'magix@xigam.tech'
}
}
scm
{
connection
=
'scm:git:git@github.com:Grasscutters/Grasscutter.git'
developerConnection
=
'scm:git:ssh://github.com:Grasscutters/Grasscutter.git'
url
=
'https://github.com/Grasscutters/Grasscutter'
}
}
}
}
repositories
{
maven
{
// change URLs to point to your repos, e.g. http://my.org/repo
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
)
}
}
}
signing
{
sign
publishing
.
publications
.
mavenJava
}
javadoc
{
if
(
JavaVersion
.
current
().
isJava9Compatible
())
{
options
.
addBooleanOption
(
'html5'
,
true
)
}
}
\ No newline at end of file
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