mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-23 19:38:08 +01:00
Setup build script for maven
This commit is contained in:
parent
3e6e8c406b
commit
e7c7669d7f
2 changed files with 35 additions and 0 deletions
34
build.gradle
34
build.gradle
|
@ -187,6 +187,40 @@ reobf {
|
||||||
shadowJar {}
|
shadowJar {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
task sourcesJar(type: Jar) {
|
||||||
|
from sourceSets.main.allSource
|
||||||
|
archiveBaseName.set(project.archivesBaseName)
|
||||||
|
archiveVersion.set("${project.version}")
|
||||||
|
archiveClassifier.set('sources')
|
||||||
|
}
|
||||||
|
|
||||||
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||||
|
from javadoc.destinationDir
|
||||||
|
archiveClassifier.set('javadoc')
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives shadowJar, sourcesJar, javadocJar
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
tasks.publish.dependsOn 'build'
|
||||||
|
publications {
|
||||||
|
mavenJava(MavenPublication) {
|
||||||
|
artifact shadowJar
|
||||||
|
artifact sourcesJar
|
||||||
|
artifact javadocJar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
if (project.hasProperty('mavendir')) {
|
||||||
|
maven { url mavendir }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String getChangelogText() {
|
String getChangelogText() {
|
||||||
def changelogFile = file('changelog.txt')
|
def changelogFile = file('changelog.txt')
|
||||||
String str = ''
|
String str = ''
|
||||||
|
|
1
settings.gradle
Normal file
1
settings.gradle
Normal file
|
@ -0,0 +1 @@
|
||||||
|
rootProject.name = 'Create'
|
Loading…
Reference in a new issue