Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 46 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
*/

plugins {
id "com.github.hierynomus.license" version "0.11.0"
id "com.github.hierynomus.license" version "0.16.1"
id 'signing'
id 'maven-publish'
}

apply plugin: 'idea'
apply plugin: 'java'
apply plugin: 'groovy'

plugins.withType(JavaPlugin) {
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 22
targetCompatibility = 22
}

ext.versions = [
Expand Down Expand Up @@ -141,25 +143,27 @@ subprojects {
configure(subprojects - expected_result_generator - tempto_examples) {
apply plugin: 'signing'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'

// plugins configuration
javadoc {
failOnError = true
}

// javadoc.jar generation
// Javadoc.jar generation
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
archiveClassifier.set('javadoc')
from(javadoc)
}

// sources.jar generation

// Sources.jar generation
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
archiveClassifier.set('sources')
from(sourceSets.main.allJava)
}


signing {
required { isReleaseVersion && !skipSigning }
sign configurations.archives
Expand All @@ -170,44 +174,46 @@ configure(subprojects - expected_result_generator - tempto_examples) {
}

// publishing to sonatype
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: nexusUsername, password: nexusPassword)
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.prestodb.tempto'
artifactId = 'tempto'
version = project.version

snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: nexusUsername, password: nexusPassword)
}
from components.java

pom.project {
pom {
packaging 'jar'
description 'Tempto - test framework'
url 'https://github.com/prestodb/tempto'
scm {
url 'git@github.com:prestodb/tempto.git'
connection 'scm:git:git@github.com:prestodb/tempto.git'
developerConnection 'scm:git:git@github.com:prestodb/tempto.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/license/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'thc'
name 'Teradata Hadoop Center'
email 'EB230060 aat teradata doot com'
}
}

// fix scm and licenses and developers
}
}
}

repositories {
maven {
url = uri('https://oss.sonatype.org/service/local/staging/deploy/maven2/')
credentials {
username = System.getenv('NEXUS_USERNAME')
password = System.getenv('NEXUS_PASSWORD')
}
}

maven {
url = uri('https://oss.sonatype.org/content/repositories/snapshots/')
credentials {
username = System.getenv('NEXUS_USERNAME')
password = System.getenv('NEXUS_PASSWORD')
}
}
}
}

signing {
sign publishing.publications.maven
}
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading