Skip to content

Commit

Permalink
v1.0.1 - Added sources to publication
Browse files Browse the repository at this point in the history
  • Loading branch information
Menecats committed Mar 11, 2021
1 parent 47f4f7d commit 3a9ef58
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import java.nio.charset.StandardCharsets

plugins {
id 'java'
id 'java-library'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

javadoc.options.encoding = StandardCharsets.UTF_8
compileJava.options.encoding = StandardCharsets.UTF_8
compileTestJava.options.encoding = StandardCharsets.UTF_8

group 'com.menecats'
version '1.0.0'
version '1.0.1'

repositories {
mavenCentral()
Expand All @@ -13,6 +23,11 @@ repositories {
dependencies {
}

task sourceJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allJava
}

publishing {
repositories {
maven {
Expand All @@ -29,9 +44,10 @@ publishing {
polybool(MavenPublication) {
version = version
groupId = group
artifactId = 'polybool-java'
artifactId = rootProject.name

from components.java
artifact tasks.sourceJar
}
}
}

0 comments on commit 3a9ef58

Please sign in to comment.