Skip to content

Commit

Permalink
fix release
Browse files Browse the repository at this point in the history
  • Loading branch information
tonisives committed Apr 18, 2024
1 parent ea9ae4e commit 21b102d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 56 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [13.2.1]

### Fixed
- Package name in Maven Central

## [13.2.0]
- Update to latest [auto api branch](https://github.com/highmobility/auto-api/commit/06905522ba2c10c96bdd2899b4148ddc47a29a58)

Expand Down
4 changes: 2 additions & 2 deletions auto-api-java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.jetbrains.kotlin.jvm'
id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion"
}

sourceCompatibility = '1.8'
Expand All @@ -25,7 +25,7 @@ dependencies {
api deps.utils
}

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'org.slf4j:slf4j-api:1.7.25'

implementation deps.findBugs // for @Nullable
Expand Down
11 changes: 2 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
buildscript {
ext.kotlinVersion = "1.7.20"

repositories {
mavenCentral()
}
}

plugins {
id 'org.jetbrains.kotlin.jvm' version "$kotlinVersion"
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id 'net.researchgate.release' version '3.0.2'
}
Expand All @@ -19,6 +10,8 @@ nexusPublishing {
}

ext {
kotlinVersion = "1.7.20"

ver = [
"hmkit-utils" : "1.4.5",
"hmkit-auto-api": "13.2.0"
Expand Down
56 changes: 12 additions & 44 deletions gradle/deploy-ossrh.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ apply plugin: "maven-publish"
apply plugin: 'signing'
apply plugin: 'net.researchgate.release'

def deploySiteUrl="https://github.com/highmobility/auto-api-java"
def deployGitUrl="https://github.com/highmobility/auto-api-java"
def deployGroupId="com.high-mobility"
def deployLicenseName="MIT"
def deployLicenseUrl="https://opensource.org/licenses/MIT"
def deployId=name

def isAndroid = project.plugins.findPlugin("com.android.library")
def deploySiteUrl = "https://github.com/highmobility/auto-api-java"
def deployGitUrl = "https://github.com/highmobility/auto-api-java"
def deployLicenseName = "MIT"
def deployLicenseUrl = "https://opensource.org/licenses/MIT"

def deployGroupId = "com.high-mobility"
def deployId = "hmkit-auto-api"

// plugin net.researchgate.release(https://github.com/researchgate/gradle-release)
// It updates the version and creates automatic commits
Expand All @@ -60,25 +60,13 @@ release {
publishing {
publications {
release(MavenPublication) {

// get aar or jar for android/java libs
if (isAndroid) {
task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}

artifact(sourceJar)
artifact("$buildDir/outputs/aar/${deployId}-release.aar")
} else {
java {
withJavadocJar()
withSourcesJar()
}

from components.java
java {
withJavadocJar()
withSourcesJar()
}

from components.java

groupId = deployGroupId
artifactId = deployId

Expand Down Expand Up @@ -110,26 +98,6 @@ publishing {
developerConnection = deployGitUrl
url = deploySiteUrl
}

if (isAndroid) {
// needed for .aar transitive dependencies
withXml {
def dependenciesNode = asNode()['dependencies'][0] ?: asNode().appendNode('dependencies')
configurations.implementation.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)

if (it.version == "unspecified") {
throw new GradleException("dependency version is unspecified " + "for $deployId submodule $it.name, node $it")
} else {
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/deploy-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Only patch number is incremented automatically on merge. To update major/minor,
## Make a test release locally to staging

- comment out line `useInMemoryPgpKeys(signingKey, signingPassword)` in deploy-ossrh.gradle
- Update version in `$projectRoot/gradle.properties` and call `./gradlew -Prelease :hmkit-fleet:publishToSonatype`.
- Update version in `$projectRoot/gradle.properties` and call `./gradlew -Prelease :auto-api-java:publishToSonatype`.
- Don't merge test version names to main

0 comments on commit 21b102d

Please sign in to comment.