From fe187a3b0b1065e8f646bbbb933aac7d1b448e5c Mon Sep 17 00:00:00 2001 From: yamelsenih Date: Sat, 11 Mar 2023 15:15:15 -0400 Subject: [PATCH] add builder --- build.gradle | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 build.gradle diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..70dcab4 --- /dev/null +++ b/build.gradle @@ -0,0 +1,111 @@ +apply plugin: 'java-library' +apply plugin: 'maven-publish' +apply plugin: 'signing' +sourceCompatibility = 1.11 +def baseVersion = '3.9.4' +def baseGroupId = 'io.github.adempiere' + +repositories { + mavenLocal() + mavenCentral() +} + +allprojects { + tasks.withType(Javadoc) { + options.addStringOption('Xdoclint:none', '-quiet') + } +} + +dependencies { + api fileTree( + dir: 'lib', + include: [ + '*.jar' + ] + ) + // ADempiere Core + api "${baseGroupId}:base:${baseVersion}" + api "${baseGroupId}:project:${baseVersion}" +} + +sourceSets { + main { + java { + srcDirs = ['src/main/java'] + } + } +} + +java { + withJavadocJar() + withSourcesJar() +} + +signing { + sign configurations.archives +} + +def entityType = 'D' +version = "1.0.0" + +jar { + manifest { + attributes("Implementation-Title": "Adempiere Template Management", + "Implementation-Version": version, + "EntityType": entityType) + } +} + +publishing { + repositories { + maven { + url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" + credentials { + username = findProperty("sonatypeUsername") + password = findProperty("sonatypePassword") + } + } + } + publications { + mavenJava(MavenPublication) { + groupId 'io.github.adempiere' + artifactId 'adempiere-pos-improvements' + version + from components.java + pom { + name = 'ADempiere POS Improvements' + description = 'A project to improve all definition of POS for ADempiere' + url = 'http://adempiere.io/' + licenses { + license { + name = 'GNU General Public License, version 2' + url = 'https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt' + } + } + developers { + developer { + id = 'yamelsenih' + name = 'Yamel Senih' + email = 'ysenih@erpya.com' + } + } + scm { + connection = 'scm:git:git://github.com/adempiere/adempiere-pos-improvements.git' + developerConnection = 'scm:git:ssh://github.com/adempiere/adempiere-pos-improvements.git' + url = 'http://github.com/adempiere/adempiere-pos-improvements' + } + } + } + } +} + +signing { + sign publishing.publications.mavenJava +} + +signing { + def signingKey = findProperty("signingKey") + def signingPassword = findProperty("signingPassword") + useInMemoryPgpKeys(signingKey, signingPassword) + sign publishing.publications.mavenJava +}