Added generatePom task.
This commit is contained in:
parent
1e70734c13
commit
878f8568cf
2 changed files with 27 additions and 21 deletions
|
@ -109,6 +109,7 @@ tasks {
|
||||||
commandLine("git", "tag", "-a", project.version, "-m", "Version ${project.version}")
|
commandLine("git", "tag", "-a", project.version, "-m", "Version ${project.version}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val publicationName = "mavenJava"
|
val publicationName = "mavenJava"
|
||||||
publishing {
|
publishing {
|
||||||
(publications) {
|
(publications) {
|
||||||
|
@ -144,6 +145,16 @@ tasks {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val generatePom by creating {
|
||||||
|
description = "Generates pom.xml for snyk."
|
||||||
|
group = PublishingPlugin.PUBLISH_TASK_GROUP
|
||||||
|
dependsOn("generatePomFileForMavenJavaPublication")
|
||||||
|
val pom = File("build/publications/$publicationName/pom-default.xml")
|
||||||
|
if (pom.exists()) {
|
||||||
|
pom.copyTo(File("pom.xml"), true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun findProperty(s: String) = project.findProperty(s) as String?
|
fun findProperty(s: String) = project.findProperty(s) as String?
|
||||||
bintray {
|
bintray {
|
||||||
user = findProperty("bintrayUser")
|
user = findProperty("bintrayUser")
|
||||||
|
@ -175,6 +186,6 @@ tasks {
|
||||||
}
|
}
|
||||||
|
|
||||||
"release" {
|
"release" {
|
||||||
dependsOn(gitTag, bintrayUpload)
|
dependsOn(generatePom, gitTag, bintrayUpload)
|
||||||
}
|
}
|
||||||
}
|
}
|
35
pom.xml
35
pom.xml
|
@ -1,10 +1,23 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>net.thauvin.erik</groupId>
|
<groupId>net.thauvin.erik</groupId>
|
||||||
<artifactId>pinboard-poster</artifactId>
|
<artifactId>pinboard-poster</artifactId>
|
||||||
<version>0.9.3</version>
|
<version>0.9.3</version>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jetbrains.kotlin</groupId>
|
||||||
|
<artifactId>kotlin-stdlib</artifactId>
|
||||||
|
<version>1.2.50</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
<artifactId>okhttp</artifactId>
|
||||||
|
<version>3.10.0</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
<name>pinboard-poster</name>
|
<name>pinboard-poster</name>
|
||||||
<description>Pinboard Poster for Kotlin/Java</description>
|
<description>Pinboard Poster for Kotlin/Java</description>
|
||||||
<url>https://github.com/ethauvin/pinboard-poster</url>
|
<url>https://github.com/ethauvin/pinboard-poster</url>
|
||||||
|
@ -26,22 +39,4 @@
|
||||||
<developerConnection>git@github.com:ethauvin/pinboard-poster.git</developerConnection>
|
<developerConnection>git@github.com:ethauvin/pinboard-poster.git</developerConnection>
|
||||||
<url>https://github.com/ethauvin/pinboard-poster</url>
|
<url>https://github.com/ethauvin/pinboard-poster</url>
|
||||||
</scm>
|
</scm>
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.jetbrains.kotlin</groupId>
|
|
||||||
<artifactId>kotlin-stdlib</artifactId>
|
|
||||||
<version>1.2.10</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
|
||||||
<artifactId>okhttp</artifactId>
|
|
||||||
<version>3.9.1</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.testng</groupId>
|
|
||||||
<artifactId>testng</artifactId>
|
|
||||||
<version>6.12</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
</project>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue