Skip to content

Commit

Permalink
update buildscript
Browse files Browse the repository at this point in the history
  • Loading branch information
bombcar committed Dec 16, 2021
1 parent 312a7b3 commit b3fe3a8
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 928ecf7feb33a1149538b0e2cd17e3bc5f281428
//version: be36e1399d5622c152db7c530c48e17cde0ce1bb
/*
DO NOT CHANGE THIS FILE!
Expand Down Expand Up @@ -42,6 +42,7 @@ plugins {
id("org.ajoberstar.grgit") version("3.1.1")
id("com.github.johnrengelman.shadow") version("4.0.4")
id("com.palantir.git-version") version("0.12.3")
id("maven-publish")
}

apply plugin: 'forge'
Expand Down Expand Up @@ -460,6 +461,38 @@ artifacts {
}
}

// publishing
publishing {
publications {
maven(MavenPublication) {
artifact source: jar
artifact source: sourcesJar, classifier: "src"
artifact source: devJar, classifier: "dev"
if (apiPackage) {
archives source: apiJar, classifier: "api"
}

groupId = System.getenv("ARTIFACT_GROUP_ID") ?: group
artifactId = System.getenv("ARTIFACT_ID") ?: project.name
version = System.getenv("ARTIFACT_VERSION") ?: project.version
}
}

repositories {
maven {
String owner = System.getenv("REPOSITORY_OWNER") ?: "Unknown"
String repositoryName = System.getenv("REPOSITORY_NAME") ?: "Unknown"
String githubRepositoryUrl = "https://maven.pkg.github.com/$owner/$repositoryName"
name = "GitHubPackages"
url = githubRepositoryUrl
credentials {
username = System.getenv("GITHUB_ACTOR") ?: "NONE"
password = System.getenv("GITHUB_TOKEN") ?: "NONE"
}
}
}
}

// Updating
task updateBuildScript {
doLast {
Expand Down

0 comments on commit b3fe3a8

Please sign in to comment.