mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
add distribution and pom to jar
This commit is contained in:
parent
b5db40cb5f
commit
240892fa83
2 changed files with 35 additions and 0 deletions
|
@ -2,7 +2,9 @@ plugins {
|
|||
java
|
||||
application
|
||||
eclipse
|
||||
`maven-publish`
|
||||
`check-lib-versions`
|
||||
`java-library-distribution`
|
||||
}
|
||||
|
||||
val projectVersion: String by project
|
||||
|
@ -39,6 +41,20 @@ configurations {
|
|||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
distributions {
|
||||
main {
|
||||
distributionBaseName.set("signal-cli")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
@ -54,6 +70,11 @@ tasks.withType<Jar> {
|
|||
"Maven-Group" to project.group
|
||||
)
|
||||
}
|
||||
dependsOn("generatePomFileForMavenPublication")
|
||||
into("META-INF/maven/${project.group}/${project.name}") {
|
||||
from("$buildDir/publications/maven/pom-default.xml")
|
||||
rename(".*", "pom.xml")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaExec> {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
`java-library`
|
||||
`check-lib-versions`
|
||||
`maven-publish`
|
||||
}
|
||||
|
||||
val projectVersion: String by project
|
||||
|
@ -32,6 +33,14 @@ configurations {
|
|||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
create<MavenPublication>("maven") {
|
||||
from(components["java"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<Jar> {
|
||||
manifest {
|
||||
attributes(
|
||||
|
@ -43,6 +52,11 @@ tasks.withType<Jar> {
|
|||
"Maven-Group" to project.group
|
||||
)
|
||||
}
|
||||
dependsOn("generatePomFileForMavenPublication")
|
||||
into("META-INF/maven/${project.group}/${project.name}") {
|
||||
from("$buildDir/publications/maven/pom-default.xml")
|
||||
rename(".*", "pom.xml")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue