Gradle v4.10.2
I’m building a Gradle Java plugin, and it builds. However when I run ./gradlew publish
it does nothing, i.e., the artifact doesn’t get published. Here’s my build.gradle
file (I have all the variables defined in my gradle.properties
file). Also, if I just run ./gradlew publish
w/o running ./gradlew build
first, it doesn’t run the build phase. What am I missing in my build.gradle
file? Thanks.
plugins {
id 'java'
id 'maven'
id 'maven-publish'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'maven-publish'
group=project.groupId
version = '0.0.1'
jar {
manifest {
attributes 'artifactId': project.artifactId,
'groupId': project.groupId,
'version': project.version
}
baseName artifactId
doLast {
println "artifactId: $project.artifactId\ngroupId: $project.groupId\nversion: $version"
}
}
dependencies {
compile gradleApi()
}
// For publishigh to S3 maven repo
publishing {
repositories {
maven {
url "s3://" + s3_bucket
credentials(AwsCredentials) {
accessKey AWS_ACCESS_KEY
secretKey AWS_SECRET_KEY
}
}
}
}