-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated gradle script to include pom configuration required for maven…
… central. Signed-off-by: Johannes Tegnér <[email protected]>
- Loading branch information
1 parent
431bf8a
commit 1cb6455
Showing
1 changed file
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,28 +19,29 @@ dependencies { | |
} | ||
|
||
version = System.getenv("RELEASE_VERSION") ?: 'NONE' | ||
group 'dev.personnummer' | ||
|
||
jar { | ||
manifest { | ||
attributes('Implementation-Title': project.name, | ||
'Implementation-Version': project.version) | ||
'Implementation-Version': project.version) | ||
} | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
archiveClassifier = 'javadoc' | ||
from javadoc | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
archiveClassifier = 'sources' | ||
from sourceSets.main.allSource | ||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
artifacts { | ||
archives javadocJar, sourcesJar, jar | ||
} | ||
|
||
javadoc { | ||
if(JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
|
@@ -80,13 +81,25 @@ publishing { | |
from components.java | ||
pom { | ||
name = 'Personnummer' | ||
description = '' | ||
description = 'personnummer is a small open-source project that validates, formatting and determine sex and age from swedish personal identity numbers' | ||
url = 'https://personnummer.dev' | ||
licenses { | ||
license { | ||
name = 'MIT' | ||
url = 'https://mit-license.org/' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'jite' | ||
name = 'Johannes Tegnér' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:[email protected]:personnummer/java.git' | ||
url = 'https://github.com/personnummer/java' | ||
} | ||
} | ||
} | ||
} | ||
|
@@ -101,5 +114,5 @@ signing { | |
} | ||
|
||
tasks.withType(Sign) { | ||
onlyIf { version != "NONE" } // so we can build jars for testing in CI | ||
onlyIf { version != "NONE" } | ||
} |