Skip to content

Commit

Permalink
add: skipSigning while publishToMavenLocal
Browse files Browse the repository at this point in the history
  • Loading branch information
shalousun committed Mar 21, 2024
1 parent 75c8ac5 commit cdf2251
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

publishToMavenLocal:
gradle publishToMavenLocal -PskipSigning
33 changes: 19 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ task javadocJar(type: Jar) {
from javadoc
}

task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}

javadoc {
configure(options) {
tags(
Expand All @@ -52,16 +61,6 @@ javadoc {
}
}

task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}

artifacts {
archives javadocJar, sourcesJar
}


// publish to https://plugins.gradle.org/
gradlePlugin {
website = 'https://github.com/TongchengOpenSource/smart-doc-gradle-plugin'
Expand All @@ -85,10 +84,6 @@ publishing {
artifactId project.name
version "${version}"
from components.java
// more goes in here
artifact sourcesJar {
classifier "sources"
}
}
}
repositories {
Expand All @@ -103,3 +98,13 @@ publishing {
}
}
}

signing {
sign publishing.publications
}

if (project.hasProperty('skipSigning') || project.gradle.startParameter.taskNames.any { it.contains("publish") }) {
signing {
required { false }
}
}

0 comments on commit cdf2251

Please sign in to comment.