Using GitHub packages

This commit is contained in:
Aleksey 2021-05-26 12:55:10 +03:00
parent 9299fd41eb
commit 7838ebed01
2 changed files with 45 additions and 35 deletions

62
.gitignore vendored
View file

@ -1,31 +1,31 @@
# gradle # gradle
.gradle/ .gradle/
build/ build/
out/ out/
classes/ classes/
# eclipse # eclipse
*.launch *.launch
# idea # idea
.idea/ .idea/
*.iml *.iml
*.ipr *.ipr
*.iws *.iws
# vscode # vscode
.settings/ .settings/
.vscode/ .vscode/
bin/ bin/
.classpath .classpath
.project .project
# fabric # fabric
run/ run/
output/ output/
*.log *.log

View file

@ -1,10 +1,10 @@
import java.util.function.BiConsumer
plugins { plugins {
id 'fabric-loom' version '0.7-SNAPSHOT' id 'fabric-loom' version '0.7-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
} }
apply plugin: 'maven'
sourceCompatibility = JavaVersion.VERSION_1_8 sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8
@ -99,10 +99,13 @@ artifacts {
archives javadocJar archives javadocJar
} }
def env = System.getenv()
// configure the maven publication // configure the maven publication
publishing { publishing {
publications { publications {
mavenJava(MavenPublication) { gpr(MavenPublication) {
artifactId archivesBaseName
artifact(remapJar) { artifact(remapJar) {
builtBy remapJar builtBy remapJar
} }
@ -114,6 +117,13 @@ publishing {
// select the repositories you want to publish to // select the repositories you want to publish to
repositories { repositories {
mavenLocal() maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/paulevsgitch/bclib")
credentials {
username = env.GITHUB_USER
password = env.GITHUB_TOKEN
}
}
} }
} }