Last active
July 7, 2021 21:39
-
-
Save fritzprix/17ff8458a56c40c734fc77109e36cf19 to your computer and use it in GitHub Desktop.
deploy.github.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.charset.StandardCharsets | |
apply plugin: 'maven' | |
repositories { | |
maven { url "https://raw.github.com/fritzprix/wagon-git/releases" } | |
} | |
configurations { | |
deployLibrary | |
} | |
dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
deployLibrary "ar.com.synergian:wagon-git:0.3.1" | |
} | |
task sourceJar(type: Jar) { | |
classifier "sources" | |
from sourceSets.main.allJava | |
} | |
artifacts { | |
archives sourceJar | |
} | |
uploadArchives { | |
repositories { | |
mavenDeployer { | |
configuration = configurations.deployLibrary | |
repository(url: "git:${ARTIFACT_VERSION.toUpperCase().contains("SNAPSHOT")? "snapshot" : "release"}://https://${USERNAME}:${PASSWORD}@github.com/${PROJECT.toLowerCase()}/${REPOSITORY_NAME}.git") | |
pom.project { | |
groupId = ARTIFACT_PACKAGE | |
version = ARTIFACT_VERSION | |
artifactId = ARTIFACT_NAME | |
packaging ARTIFACT_PACKAGING | |
} | |
} | |
mavenDeployer { | |
configuration = configurations.deployLibrary | |
repository{ | |
mavenLocal() | |
} | |
pom.project { | |
groupId = ARTIFACT_PACKAGE | |
version = ARTIFACT_VERSION | |
artifactId = ARTIFACT_NAME | |
packaging ARTIFACT_PACKAGING | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment