Build sources jar

Fixes #3
This commit is contained in:
Justin Abrahms 2022-05-13 10:28:26 -07:00
parent 148876c4e5
commit 8d7f823f3e
No known key found for this signature in database
GPG Key ID: 599E2E12011DC474
1 changed files with 15 additions and 0 deletions

View File

@ -45,6 +45,17 @@ tasks.named('test') {
useJUnitPlatform()
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
archiveBaseName = 'openfeature'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
jar.archiveBaseName = 'openfeature'
def repo_url = System.getenv("REPOSITORY_URL")
@ -57,6 +68,10 @@ publishing {
maven(MavenPublication) {
artifactId="javasdk"
from components.java
artifacts {
archives sourcesJar
archives jar
}
pom {
name = 'OpenFeature SDK'