Skip to content

Commit

Permalink
chore: fix artifactid and version for -jre6 and -jre7 artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed May 28, 2020
1 parent 148840d commit 97e2e8f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pgjdbc-jre6/build.gradle.kts
Expand Up @@ -23,6 +23,9 @@ buildscript {
}
}

version = version.toString().replaceFirst(Regex("(-SNAPSHOT)?$"), ".jre6\$1")
setProperty("archivesBaseName", "postgresql")

val java6home by props("")

val String.v: String get() = rootProject.extra["$this.version"] as String
Expand Down Expand Up @@ -87,6 +90,12 @@ tasks.configureEach<JavaCommentPreprocessorTask> {
excludedPatterns.addAll("**/jre8/", "**/jdbc42/")
}

tasks.jar {
into("META-INF") {
from("$rootDir/LICENSE")
}
}

val osgiJar by tasks.registering(Bundle::class) {
archiveClassifier.set("osgi")
from(tasks.jar.map { zipTree(it.archiveFile) })
Expand Down Expand Up @@ -117,3 +126,12 @@ val extraMavenPublications by configurations.getting
classifier = ""
}
}

publishing {
publications {
withType<MavenPublication>().configureEach {
artifactId = "postgresql"
version = project.version.toString()
}
}
}
12 changes: 12 additions & 0 deletions pgjdbc-jre7/build.gradle.kts
Expand Up @@ -26,6 +26,9 @@ buildscript {
}
}

version = version.toString().replaceFirst(Regex("(-SNAPSHOT)?$"), ".jre7\$1")
setProperty("archivesBaseName", "postgresql")

val java7home by props("")

// <editor-fold defaultstate="collapsed" desc="Shade configuration">
Expand Down Expand Up @@ -182,3 +185,12 @@ val extraMavenPublications by configurations.getting
classifier = ""
}
}

publishing {
publications {
withType<MavenPublication>().configureEach {
artifactId = "postgresql"
version = project.version.toString()
}
}
}

0 comments on commit 97e2e8f

Please sign in to comment.