Added publishing to packages task.
Some checks are pending
Groowt CI Pipeline / ci (push) Waiting to run
Some checks are pending
Groowt CI Pipeline / ci (push) Waiting to run
This commit is contained in:
parent
1d0de99e1d
commit
dcc1d6e53e
@ -4,6 +4,8 @@ import com.jessebrault.jbarchiva.JbArchivaPlugin
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||
import org.gradle.api.credentials.HttpHeaderCredentials
|
||||
import org.gradle.authentication.http.HttpHeaderAuthentication
|
||||
|
||||
class GroowtPublishPlugin implements Plugin<Project> {
|
||||
|
||||
@ -11,6 +13,25 @@ class GroowtPublishPlugin implements Plugin<Project> {
|
||||
void apply(Project project) {
|
||||
project.plugins.apply(MavenPublishPlugin)
|
||||
project.plugins.apply(JbArchivaPlugin)
|
||||
project.with {
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = "Gitea"
|
||||
url = uri("https://git.jessebrault.com/api/packages/jessebrault/maven")
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Authorization"
|
||||
value = "token ${System.getenv("GITEA_ACCESS_TOKEN")}"
|
||||
}
|
||||
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user