commit c0577601333c7d0d3666b46994e3a64ac99943eb
parent a93a4bac6e843b0a84253a32752c9c88aa85b0fd
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Tue, 17 Jan 2023 12:22:50 +0100
trying and failing to get grade to produce a proper source TGZ
Diffstat:
| M | build.gradle | | | 67 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- |
1 file changed, 66 insertions(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
@@ -1,17 +1,30 @@
+// This file is in the public domain.
+
import org.apache.tools.ant.filters.ReplaceTokens
plugins {
// id 'org.jetbrains.kotlin.jvm' version '1.5.30'
id 'org.jetbrains.kotlin.jvm' version '1.7.22'
id 'idea'
+ id 'java-library'
+ id 'maven-publish'
+ // id 'signing'
}
+group = 'tech.libeufin'
+version = '0.9.1'
+
if (!JavaVersion.current().isJava11Compatible()){
throw new GradleException(
"This build must be run with java 11 " +
"or later (your version is java ${JavaVersion.current()})")
}
+java {
+ withJavadocJar()
+ withSourcesJar()
+}
+
allprojects {
ext.set("ktor_version", "2.2.1")
ext.set("ktor_auth_version", "1.6.8")
@@ -29,7 +42,6 @@ idea {
}
}
-setVersion("0.0.1-dev.3")
task versionFile() {
new File("${projectDir}/util/src/main/resources", "version.txt").text = getRootProject().version
@@ -73,3 +85,56 @@ task dist(type: Zip) {
}
into(topDir)
}
+
+
+publishing {
+ publications {
+ mavenJava(MavenPublication) {
+ artifactId = 'libeufin'
+ from components.java
+ versionMapping {
+ usage('java-api') {
+ fromResolutionOf('runtimeClasspath')
+ }
+ usage('java-runtime') {
+ fromResolutionResult()
+ }
+ }
+ pom {
+ name = 'libeufin'
+ description = 'Implementation of EBICS'
+ url = 'https://libeufin.tech/'
+ licenses {
+ license {
+ name = 'GNU Affero General Public License, Version 3.0+'
+ url = 'https://www.gnu.org/licenses/agpl-3.0.txt'
+ }
+ }
+ scm {
+ connection = 'scm:git:git://git.taler.net/libeufin.git'
+ developerConnection = 'scm:git:ssh://git.taler.net/libeufin.git'
+ url = 'https://git.taler.net/libeufin.git/'
+ }
+ }
+ }
+ }
+ repositories {
+ maven {
+ // change URLs to point to your repos, e.g. http://my.org/repo
+ def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
+ def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
+ url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
+ }
+ }
+}
+
+//signing {
+// sign publishing.publications.mavenJava
+//}
+
+
+javadoc {
+ if(JavaVersion.current().isJava9Compatible()) {
+ options.addBooleanOption('html5', true)
+ }
+}