Skip to content

Commit 3a9ef58

Browse files
committed
v1.0.1 - Added sources to publication
1 parent 47f4f7d commit 3a9ef58

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

build.gradle

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
import java.nio.charset.StandardCharsets
2+
13
plugins {
24
id 'java'
5+
id 'java-library'
36
id 'maven-publish'
47
}
58

9+
sourceCompatibility = JavaVersion.VERSION_1_8
10+
targetCompatibility = JavaVersion.VERSION_1_8
11+
12+
javadoc.options.encoding = StandardCharsets.UTF_8
13+
compileJava.options.encoding = StandardCharsets.UTF_8
14+
compileTestJava.options.encoding = StandardCharsets.UTF_8
15+
616
group 'com.menecats'
7-
version '1.0.0'
17+
version '1.0.1'
818

919
repositories {
1020
mavenCentral()
@@ -13,6 +23,11 @@ repositories {
1323
dependencies {
1424
}
1525

26+
task sourceJar(type: Jar) {
27+
classifier 'sources'
28+
from sourceSets.main.allJava
29+
}
30+
1631
publishing {
1732
repositories {
1833
maven {
@@ -29,9 +44,10 @@ publishing {
2944
polybool(MavenPublication) {
3045
version = version
3146
groupId = group
32-
artifactId = 'polybool-java'
47+
artifactId = rootProject.name
3348

3449
from components.java
50+
artifact tasks.sourceJar
3551
}
3652
}
3753
}

0 commit comments

Comments
 (0)