feat: create repository
This commit is contained in:
53
build.gradle
Normal file
53
build.gradle
Normal file
@@ -0,0 +1,53 @@
|
||||
//file:noinspection GroovyAssignabilityCheck
|
||||
//file:noinspection GrUnresolvedAccess
|
||||
plugins {
|
||||
id "groovy"
|
||||
id "java-gradle-plugin"
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
wrapper {
|
||||
gradleVersion = "8.7"
|
||||
distributionType = Wrapper.DistributionType.BIN
|
||||
}
|
||||
|
||||
project.group = "di9.gradle"
|
||||
project.version = "1.0"
|
||||
|
||||
gradlePlugin.plugins {
|
||||
githooksPlugin {
|
||||
id = "di9.githooks"
|
||||
displayName = "githooks plugin"
|
||||
description = "Simple githooks plugin"
|
||||
implementationClass = "di9.gradle.githooks.GitHooksPlugin"
|
||||
}
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
mavenBinary(MavenPublication) {
|
||||
groupId = project.group
|
||||
artifactId = project.name
|
||||
version = project.version
|
||||
|
||||
from components.java
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name = "DI9"
|
||||
url = System.getenv("GITEA_URI")
|
||||
def giteaToken = System.getenv("GITEA_TOKEN")
|
||||
|
||||
credentials(HttpHeaderCredentials) {
|
||||
name = "Authorization"
|
||||
value = "token ${giteaToken}"
|
||||
}
|
||||
|
||||
authentication {
|
||||
header(HttpHeaderAuthentication)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user