Verified Commit 80c7e4aa authored by AtjonTV's avatar AtjonTV

Build: Move publication to Gradle

* Maven is no longer required for Publishing
* We now only have one place to change versions: gradle.properties
parent 2eddb443
Pipeline #2130 passed with stages
in 3 minutes and 36 seconds
......@@ -12,6 +12,9 @@ package:
$(GRADLE) $(GRAARG) jar
$(GRADLE) $(GRAARG) sourcesJar
publish:
$(GRADLE) $(GRAARG) publish
lint:
$(GRADLE) $(GRAARG) lintKotlin
......
......@@ -58,3 +58,49 @@ task sourcesJar(type: Jar, dependsOn: classes) {
dokka {
outputFormat = 'html'
}
publishing {
publications {
mavenKotlin(MavenPublication) {
groupId = 'com.atvgstudios'
artifactId = 'klib'
version = "$klib_version"
from components.java
pom {
name = 'kLib'
description = 'kLib is a Generic Kotlin Library to simplify development'
url = 'https://klib.atvg-studios.com'
licenses {
license {
name = 'OSPL20'
url = 'https://gitlab.atvg-studios.com/atvg-studios/kLib/blob/master/LICENSE'
}
}
developers {
developer {
id = 'atjontv'
name = 'Thomas Obernosterer'
email = 'thomas.obernosterer@atvg-studios.com'
}
}
scm {
connection = 'scm:git:git://gitlab.atvg-studios.com/atvg-studios/kLib.git'
developerConnection = 'scm:git:ssh://gitlab.atvg-studios.com/atvg-studios/kLib.git'
url = 'https://gitlab.atvg-studios.com/atvg-studios/kLib.git'
}
}
}
}
repositories {
maven {
def releaseUrl = '/data/atjontv/git/maven-repo'
def snapshotUrl = '/data/atjontv/git/maven-repo/snapshots'
url = version.contains('dev') ? snapshotUrl : releaseUrl
}
}
}
signing {
useGpgCmd()
sign publishing.publications.mavenKotlin
}
......@@ -13,3 +13,7 @@ kotlinter_version=2.3.2
# Speedup Compilation
kapt.incremental.apt=true
kapt.use.worker.api=true
# Signing
signing.gnupg.executable=gpg
signing.gnupg.keyName=480BBBFD763B61E2E9733F9EB1318720C27F57F5
#!/bin/bash
VERSION="5.0.0-dev.5"
ATVG_DIST="file:///data/atjontv/git/maven-repo"
DIST="$ATVG_DIST"
REPO="atvg-studios"
if [ "$1" = "-dev" ]
then
DIST="$ATVG_DIST/snapshots"
fi
mvn gpg:sign-and-deploy-file \
-DrepositoryId=$REPO \
-Durl=$DIST \
-DgroupId=com.atvgstudios \
-DartifactId=klib \
-Dversion=$VERSION \
-Dpackaging=jar \
-Dsources=build/libs/klib-$VERSION-sources.jar \
-Dfile=build/libs/klib-$VERSION.jar \
-DpomFile=maven/pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.atvgstudios</groupId>
<artifactId>klib</artifactId>
<version>5.0.0-dev.5</version>
<name>kLib</name>
<description>kLib is a Generic Kotlin Library to simplify development.</description>
<url>https://klib.atvg-studios.com/</url>
<licenses>
<license>
<name>OSPL20</name>
<url>https://gitlab.atvg-studios.com/atvg-studios/kLib/blob/master/LICENSE</url>
</license>
</licenses>
<developers>
<developer>
<id>atjontv</id>
<name>Thomas Obernosterer</name>
<email>thomas.obernosterer@atvg-studios.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:git://gitlab.atvg-studios.com/atvg-studios/kLib.git</connection>
<developerConnection>scm:git:ssh://gitlab.atvg-studios.com/atvg-studios/kLib.git</developerConnection>
<url>https://gitlab.atvg-studios.com/atvg-studios/kLib.git</url>
</scm>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib-jdk8</artifactId>
<version>1.3.70</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>net.jemzart</groupId>
<artifactId>jsonkraken</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
</project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment