~/.gradle/gradle.properties
.myDomainRepositoryUsername={token}
myDomainRepositoryPassword={secret}
Warning
This should be in your GRADLE_USER_HOME, not your project gradle.properties file:$ ./gradlew publish \
-PmyDomainRepositoryUsername={token} \
-PmyDomainRepositoryPassword={secret}
publishing
plugin, as well as the maven repository:plugins {
`maven-publish`
}
publishing {
repositories {
maven {
name = "myDomainRepository"
url = uri("https://repo.my-domain.com/releases")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "com.example"
artifactId = "library"
version = "1.0.0"
from(components["java"])
}
}
}
plugins {
id 'maven-publish'
}
publishing {
repositories {
maven {
name = "myDomainRepository"
url = "https://repo.my-domain.com/releases"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
publications {
maven(MavenPublication) {
groupId = "com.example"
artifactId = "library"
version = "1.0.0"
from components.java
}
}
}
# Releases token & secret
myDomainRepositoryReleasesUsername={token}
myDomainRepositoryReleasesPassword={secret}
# Snapshots token & secret
myCoolRepositorySnapshotsUsername={token}
myCoolRepositorySnapshotsPassword={secret}
maven {
name = "myDomainRepositoryReleases"
url = uri("https://repo.my-domain.com/releases")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
maven {
name = "myCoolRepositorySnapshots"
url = uri("https://repo.my-cool.com/snapshots")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
maven {
name = "myDomainRepositoryReleases"
url = "https://repo.my-domain.com/releases"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
maven {
name = "myCoolRepositorySnapshots"
url = uri("https://repo.my-cool.com/snapshots")
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
Did you find misleading or deprecated content? Maybe you just feel this section misses important elements?
Copyright © 2023 dzikoysk with ❤ panda-lang