Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasJohansson committed Mar 25, 2021
1 parent 6917509 commit 0d2db25
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 7 deletions.
84 changes: 78 additions & 6 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,49 @@ plugins {
id 'java-library'

// Apply the org.jetbrains.kotlin.jvm Plugin to add support for Kotlin.
id 'org.jetbrains.kotlin.jvm' version '1.4.31'
//id 'org.jetbrains.kotlin.jvm' version '1.4.31'

id 'signing'
id 'maven'
}

group 'com.programmerare.crs-transformation'
version '0.1-SNAPSHOT'
group = 'com.programmerare.sweden-crs-transformations-4jvm' // maven groupId
archivesBaseName = rootProject.name // defined in settings.gradle 'sweden-crs-transformations-4jvm'
version = '1.0.0'
def isReleaseVersion = !version.endsWith("-SNAPSHOT")

def theJavaVersion = JavaVersion.VERSION_1_6
sourceCompatibility=theJavaVersion
targetCompatibility=theJavaVersion

// ----------------------------------------------
// https://docs.gradle.org/current/userguide/maven_plugin.html
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
configurations {
deployerJars
}
// ----------------------------------------------

repositories {
jcenter()
mavenCentral()
}

dependencies {
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2" // https://docs.gradle.org/current/userguide/maven_plugin.html
/*
// https://mvnrepository.com/artifact/org.scala-lang/scala-library
implementation 'org.scala-lang:scala-library:2.13.5'
testImplementation 'org.scala-lang:scala-library:2.13.5'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
// https://mvnrepository.com/artifact/com.google.guava/guava
Expand Down Expand Up @@ -52,8 +77,8 @@ dependencies {
// The below dependency was generated when using Intellij IDEA to generate a gradle/Kotlin project:
// implementation "org.jetbrains.kotlin:kotlin-stdlib"
// But those below was generated when instead using "gradle init"
implementation platform('org.jetbrains.kotlin:kotlin-bom') // Align versions of all Kotlin components
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation platform('org.jetbrains.kotlin:kotlin-bom') // Align versions of all Kotlin components
testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation 'org.jetbrains.kotlin:kotlin-test'
testImplementation 'org.jetbrains.kotlin:kotlin-test-junit'
// ------------------------------------------------------
Expand All @@ -62,4 +87,51 @@ dependencies {
// This 'goober' library is used from the example class:
// lib/src/test/java/com/programmerare/sweden_crs_transformations_4jvm/example/ExampleComparingWithGooberLibrary.java
testImplementation 'com.github.goober:coordinate-transformation-library:1.1'
*/
}

tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}

signing {
required { isReleaseVersion }
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }

repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: s01MavenUser, password: s01MavenPassword)
}
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: s01MavenUser, password: s01MavenPassword)
}

pom.project {
name = 'sweden_crs_transformations_4jvm'
description = 'Java/JVM library for transformation of geographic coordinates between WGS84 and the Swedish coordinate reference systems SWEREF99 and RT90'
url = "https://github.com/TomasJohansson/sweden_crs_transformations_4jvm"
licenses {
license {
name = 'MIT License'
url = "https://github.com/TomasJohansson/sweden_crs_transformations_4jvm"
}
}
developers {
developer {
name = "Tomas Johansson"
organizationUrl = "https://programmerare.com"
}
}
scm {
url = "https://github.com/TomasJohansson/sweden_crs_transformations_4jvm"
}
}
}
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* in the user manual at https://docs.gradle.org/6.8.3/userguide/multi_project_builds.html
*/

rootProject.name = 'sweden_crs_transformations_4jvm'
rootProject.name = 'sweden-crs-transformations-4jvm'
include('lib')

0 comments on commit 0d2db25

Please sign in to comment.