diff --git a/build.gradle b/build.gradle index 20e14f5cc91982f1952861dd75d633be9f46e5c5..be96394c1032d4846c224d9829986b8a7ca941e0 100644 --- a/build.gradle +++ b/build.gradle @@ -5,6 +5,7 @@ apply plugin: 'java' apply plugin: 'jastadd' apply plugin: 'application' apply plugin: 'idea' +apply plugin: 'maven-publish' mainClassName = 'de.tudresden.inf.st.openapi' @@ -161,3 +162,33 @@ jastadd { delete "src/gen-res" } } + +publishing { + publications { + maven(MavenPublication) { + artifactId = 'test-rago' + // from components.java + artifact("build/libs/rago-${version}.jar") { + extension 'jar' + } + } + } + repositories { + maven { + url "https://git-st.inf.tu-dresden.de/api/v4/projects/$System.env.CI_PROJECT_ID/packages/maven" + // Uncomment the following lines to publish manually (and comment out the other credentials section) +// credentials(HttpHeaderCredentials) { +// name = "Private-Token" +// value = gitLabPrivateToken // the variable resides in ~/.gradle/gradle.properties +// } + credentials(HttpHeaderCredentials) { + name = 'Job-Token' + value = System.getenv("CI_JOB_TOKEN") + } + authentication { + header(HttpHeaderAuthentication) + } + } + + } +} diff --git a/settings.gradle b/settings.gradle index 18f4a228c485725985b21b94f35cda46dada050f..e88ca10aca8195b83f0c3a1e5bdde94f4565f35b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ -rootProject.name = 'jastadd-openapi' +rootProject.name = 'jastadd-rago'