Skip to content

Commit

Permalink
Fix artifacts publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
valfirst committed Feb 2, 2025
1 parent 2ed8f89 commit 02d293e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 10 deletions.
7 changes: 7 additions & 0 deletions browserup-proxy-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'groovy'
id 'java-library'
id 'signing'
}

archivesBaseName = 'browserup-proxy-core'
Expand Down Expand Up @@ -57,6 +58,12 @@ publishing {
}
}

signing {
if (project.hasProperty('sign')) {
sign publishing.publications.mavenJava
}
}

dependencies {
api "io.netty:netty-all:${nettyVersion}"
api("io.github.littleproxy:littleproxy:${littleProxyVersion}") {
Expand Down
16 changes: 15 additions & 1 deletion browserup-proxy-dist/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'application'
id 'signing'
}

application {
Expand Down Expand Up @@ -27,7 +28,14 @@ publishing {
mavenJava(MavenPublication) {
groupId "${project.group}"
artifactId "${archivesBaseName}"
from components.java
afterEvaluate {
if (distZip.enabled) {
artifact distZip
}
if (distTar.enabled) {
artifact distTar
}
}

pom {
name = archivesBaseName
Expand Down Expand Up @@ -60,6 +68,12 @@ publishing {
}
}

signing {
if (project.hasProperty('sign')) {
sign publishing.publications.mavenJava
}
}

dependencies {
implementation project(':browserup-proxy-core')
implementation project(':browserup-proxy-rest')
Expand Down
9 changes: 8 additions & 1 deletion browserup-proxy-mitm/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-library'
id 'groovy'
id 'java-library'
id 'signing'
}

archivesBaseName = 'browserup-proxy-mitm'
Expand Down Expand Up @@ -57,6 +58,12 @@ publishing {
}
}

signing {
if (project.hasProperty('sign')) {
sign publishing.publications.mavenJava
}
}

dependencies {
implementation "com.google.guava:guava:${guavaVersion}"

Expand Down
9 changes: 8 additions & 1 deletion browserup-proxy-rest/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'java-library'
id 'groovy'
id 'java-library'
id 'signing'
}

archivesBaseName = 'browserup-proxy-rest'
Expand Down Expand Up @@ -101,6 +102,12 @@ dependencies {
testImplementation 'com.github.tomakehurst:wiremock-jre8:2.35.0'
}

signing {
if (project.hasProperty('sign')) {
sign publishing.publications.mavenJava
}
}

tasks.register('createVersionProperties') {
doLast {
new File("$buildDir/resources/main/browserup-proxy-rest-version.properties").withWriter { w ->
Expand Down
7 changes: 0 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ subprojects {
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'signing'

group = 'com.github.valfirst.browserup-proxy'
version = '3.0.2-SNAPSHOT'
Expand Down Expand Up @@ -44,12 +43,6 @@ subprojects {
withSourcesJar()
}

signing {
if (project.hasProperty("sign")) {
sign configurations.archives
}
}

artifacts {
archives jar
archives sourcesJar
Expand Down

0 comments on commit 02d293e

Please sign in to comment.