diff --git a/build.gradle b/build.gradle index 61a7912..4f45a55 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,4 @@ -plugins -{ +plugins { id 'java-library' } @@ -9,14 +8,12 @@ archivesBaseName='unpick' targetCompatibility = 1.8 -repositories -{ +repositories { jcenter() mavenCentral() } -dependencies -{ +dependencies { implementation 'org.ow2.asm:asm:7.0' implementation 'org.ow2.asm:asm-commons:7.0' implementation 'org.ow2.asm:asm-tree:7.0' @@ -25,3 +22,18 @@ dependencies // Use JUnit test framework testImplementation 'junit:junit:4.12' } + +task sourcesJar(type: Jar, dependsOn: classes) { + classifier = 'sources' + from sourceSets.main.allSource +} + +task javadocJar(type: Jar, dependsOn: javadoc) { + classifier = 'javadoc' + from javadoc.destinationDir +} + +artifacts { + archives sourcesJar + archives javadocJar +}