Skip to content

Commit

Permalink
maven publish buildscript update
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchej123 committed Jan 18, 2022
1 parent 0a14836 commit 818df45
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
prerelease: false
title: "${{ env.RELEASE_VERSION }}"
files: build/libs/*.jar

- name: Publish to Maven
run: ./gradlew publish
env:
Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Any Github changes require admin approval
/.github/** @GTNewHorizons/admin

17 changes: 11 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1642464427
//version: 1642484596
/*
DO NOT CHANGE THIS FILE!
Expand Down Expand Up @@ -88,6 +88,7 @@ checkPropertyExists("containsMixinsAndOrCoreModOnly")
checkPropertyExists("usesShadowedDependencies")
checkPropertyExists("developmentEnvironmentUserName")

boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false

String javaSourceDir = "src/main/java/"
String scalaSourceDir = "src/main/scala/"
Expand Down Expand Up @@ -484,7 +485,9 @@ task apiJar(type: Jar) {
}

artifacts {
archives sourcesJar
if(!noPublishedSources) {
archives sourcesJar
}
archives devJar
if(apiPackage) {
archives apiJar
Expand All @@ -495,9 +498,11 @@ artifacts {
publishing {
publications {
maven(MavenPublication) {
artifact source: jar
artifact source: sourcesJar, classifier: "src"
artifact source: devJar, classifier: "dev"
artifact source: usesShadowedDependencies.toBoolean() ? shadowJar : jar, classifier: ""
if(!noPublishedSources) {
artifact source: sourcesJar, classifier: "src"
}
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
if (apiPackage) {
artifact source: apiJar, classifier: "api"
}
Expand All @@ -508,7 +513,7 @@ publishing {
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
}
}

repositories {
maven {
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases"
Expand Down

0 comments on commit 818df45

Please sign in to comment.