Skip to content

Commit

Permalink
use my own website for publishing jars
Browse files Browse the repository at this point in the history
  • Loading branch information
jillesvangurp committed Aug 24, 2020
1 parent d0a5e72 commit 69ceb30
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ test-output
build
out
.kotlintest
localRepo
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
![Java CI with Gradle](https://github.com/jillesvangurp/geogeometry/workflows/Java%20CI%20with%20Gradle/badge.svg)
[![](https://jitpack.io/v/jillesvangurp/geogeometry.svg)](https://jitpack.io/#jillesvangurp/geogeometry)

# Introduction

Expand Down Expand Up @@ -57,9 +56,30 @@ with this approach is that details that are too small, are not covered by hashes

# Get it

Use the latest jitpack releases:
This is a kotlin multiplatform distribution with packages for `-jvm` and `-js` (currently). Currently,
multiplatform does not work with `jitpack.io` which I use on other projects. Older versions are still
available on [jitpack](https://jitpack.io/#jillesvangurp/geogeometry/v3.1.1). If you are interested,
there's an [open bug for this](https://github.com/jitpack/jitpack.io/issues/3853).

[![](https://jitpack.io/v/jillesvangurp/geogeometry.svg)](https://jitpack.io/#jillesvangurp/geogeometry)
So, as a workaround, I currently distribute jars via my website. To add the repository, add something
like this to your `build.gradle.kts` file:

```kotlin
repositories {
mavenCentral()
maven { url = uri("https://www.jillesvangurp.com/maven") }
}
```

and then add the dependency:

```kotlin
implementation("com.github.jillesvangurp:geogeometry:3.1.5")
```

For older versions of gradle you may have to specify a postfix `-jvm` or `-js`. Supposedly recent versions are smarter about figuring out multiplatform.

Let me know if you have issues accessing.

# Building from source

Expand Down
7 changes: 1 addition & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
kotlin("multiplatform") version "1.3.72"
id("com.github.ben-manes.versions") version "0.28.0" // gradle dependencyUpdates -Drevision=release
Expand All @@ -12,8 +9,6 @@ repositories {
mavenCentral()
maven(url = "https://jitpack.io")
}
group = "com.github.jillesvangurp"
version = "0.1-SNAPSHOT"

val kotlinVersion = "1.3.72"
val slf4jVersion = "1.7.26"
Expand Down Expand Up @@ -98,7 +93,7 @@ kotlin {
publishing {
repositories {
maven {
url = uri("file://$buildDir/localRepo")
url = uri("file://$projectDir/localRepo")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version=0.0.1-SNAPSHOT
version=0.0.0.1-SNAPSHOT
group=com.github.jillesvangurp
15 changes: 15 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /usr/bin/env bash

die () {
echo >&2 "$@"
exit 1
}

[ "$#" -eq 1 ] || die "1 argument required, $# provided"
echo $1 | grep -E -q '^[0-9]+\.[0-9]+(\.[0-9]+)$' || die "Semantic Version argument required, $1 provided"

export TAG=$1
echo "publishing $TAG"

gradle -Pgroup=com.github.jillesvangurp -Pversion=$TAG publish
rsync -azp localrepo/* jillesvangurpcom@ftp.jillesvangurp.com:/srv/home/jillesvangurpcom/domains/jillesvangurp.com/htdocs/www/maven

0 comments on commit 69ceb30

Please sign in to comment.