Commit c4572978 authored by Benedikt Geißler's avatar Benedikt Geißler 🐸

Extend published artifacts

parent 2133218c
......@@ -3,7 +3,7 @@ plugins {
id 'net.ltgt.errorprone' version '0.0.8'
}
version = '0.1.0'
version = '0.1.1'
group = 'gone.corewars.library'
apply plugin: 'java'
......@@ -14,7 +14,6 @@ apply plugin: 'jacoco'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'maven-publish'
repositories {
......@@ -36,6 +35,22 @@ jacocoTestReport {
additionalSourceDirs = files(sourceSets.main.java.srcDirs)
}
// custom tasks for creating source/javadoc jars
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// add javadoc/source jar tasks as artifacts
artifacts {
archives sourcesJar, javadocJar
}
publishing {
publications {
JarPublication(MavenPublication) {
......@@ -43,6 +58,9 @@ publishing {
groupId 'gone.corewars.library'
artifactId 'corewars-lib'
version project.version
artifact sourcesJar
artifact javadocJar
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment