Skip to content

Commit c9925bc

Browse files
authored
Mage 1603 (#84)
[mage-1603] 1) Update sqlite-android dependency version to 3500400 2) Add workflow for Maven publishing
1 parent 7f6b882 commit c9925bc

File tree

7 files changed

+99
-42
lines changed

7 files changed

+99
-42
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish and close to staging repo
2+
#Uploads to a new staging repository and closes it, making it available for viewing on the Maven portal
3+
#The repo will then need to be manually released on the portal before it is available on Maven Central
4+
on:
5+
release:
6+
types: [published]
7+
#manual triggering
8+
workflow_dispatch:
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '17'
21+
distribution: 'temurin'
22+
cache: 'gradle'
23+
24+
- name: Grant execute permission for gradlew
25+
run: chmod +x gradlew
26+
27+
- name: Publish and Close Sonatype Staging Repository
28+
env:
29+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
30+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
31+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
32+
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
33+
run: |
34+
# publishToSonatype: Uploads artifacts to a new staging repository.
35+
# closeSonatypeRepository: Closes the staging repository, running validations and making it visible in the portal.
36+
./gradlew publishToSonatype closeSonatypeStagingRepository --no-scan

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
66

7-
## 6.7.5 (TBD)
7+
## 6.7.5
88

9-
* TBD
9+
* SQLite Android Bindings version 3500400
1010

1111
## [6.7.4](https://github.com/ngageoint/geopackage-android/releases/tag/6.7.4) (04-05-2024)
1212

build.gradle

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,43 @@ buildscript {
1212
}
1313
}
1414

15+
plugins {
16+
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
17+
}
18+
1519
allprojects {
20+
group = "mil.nga.geopackage"
21+
version = "6.7.5"
22+
1623
repositories {
1724
google()
1825
mavenCentral()
1926
mavenLocal()
2027
}
2128
}
29+
30+
nexusPublishing {
31+
repositories {
32+
sonatype {
33+
nexusUrl = uri("https://ossrh-staging-api.central.sonatype.com/service/local/")
34+
35+
username = System.getenv("SONATYPE_USERNAME")
36+
password = System.getenv("SONATYPE_PASSWORD")
37+
}
38+
}
39+
}
40+
41+
subprojects {
42+
apply plugin: 'signing' //apply signing plugin to all subprojects
43+
44+
afterEvaluate {
45+
def signingKey = System.getenv("GPG_PRIVATE_KEY")
46+
def signingPassword = System.getenv("GPG_PASSWORD")
47+
if (signingKey != null && signingPassword != null) {
48+
signing {
49+
useInMemoryPgpKeys(signingKey, signingPassword)
50+
sign publishing.publications
51+
}
52+
}
53+
}
54+
}

geopackage-sdk/build.gradle

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
apply plugin: 'com.android.library'
2-
apply plugin: 'kotlin-android'
3-
apply plugin: 'maven-publish'
4-
apply plugin: 'signing'
1+
plugins {
2+
id "com.android.library"
3+
id "kotlin-android"
4+
id "maven-publish"
5+
}
56

6-
group = "mil.nga.geopackage"
77
archivesBaseName = "geopackage-android"
8-
version = "6.7.5"
98

109
android {
1110
namespace 'mil.nga.geopackage'
@@ -89,7 +88,6 @@ android {
8988
publishing {
9089
singleVariant("release")
9190
}
92-
9391
}
9492

9593
afterEvaluate {
@@ -107,7 +105,7 @@ afterEvaluate {
107105

108106
groupId = group
109107
artifactId = archivesBaseName
110-
version = version
108+
111109
pom {
112110
name = 'GeoPackage Android'
113111
packaging = 'aar'
@@ -135,34 +133,18 @@ afterEvaluate {
135133

136134
developers {
137135
developer {
138-
id = 'bosborn'
139-
name = 'Brian Osborn'
140-
email = 'bosborn@caci.com'
141-
organizationUrl = 'https://www.caci.com/bit-systems'
136+
id = 'nruss11-om'
137+
name = 'Nathan Russell'
138+
email = 'nathan.russell@omnifederal.com'
139+
organizationUrl = 'https://omnifederal.com/'
142140
timezone = 'UTC-07'
143141
}
144142
}
145143
}
146144
}
147145
}
148-
repositories {
149-
maven {
150-
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
151-
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
152-
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
153-
def user = project.hasProperty('ossrhUsername') ? ossrhUsername : ""
154-
def pw = project.hasProperty('ossrhPassword') ? ossrhPassword : ""
155-
credentials {
156-
username = user
157-
password = pw
158-
}
159-
}
160-
}
161146
}
162147

163-
signing {
164-
sign publishing.publications.maven
165-
}
166148
}
167149

168150
dependencies {
@@ -174,7 +156,7 @@ dependencies {
174156
}
175157
api 'ar.com.hjg:pngj:2.1.0'
176158
api 'mil.nga:tiff:3.0.0'
177-
api 'mil.nga:sqlite-android:3450200'
159+
api 'mil.nga:sqlite-android:3500400'
178160
javadocDeps 'com.j256.ormlite:ormlite-android:6.1'
179161
javadocDeps 'mil.nga.geopackage:geopackage-core:6.6.7'
180162
javadocDeps 'ar.com.hjg:pngj:2.1.0'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Mar 20 05:14:31 MDT 2024
1+
#Mon Oct 06 13:39:52 CDT 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
sqlite-android downloaded from https://sqlite.org/download.html
22

33
Sign Files:
4-
gpg2 -ab sqlite-android-3450200.pom
5-
gpg2 -ab sqlite-android-3450200.aar
4+
gpg2 -ab sqlite-android-3500400.pom
5+
gpg2 -ab sqlite-android-3500400.aar
66

77
Bundle:
8-
jar -cvf bundle.jar sqlite-android-3450200.pom sqlite-android-3450200.pom.asc sqlite-android-3450200.aar sqlite-android-3450200.aar.asc
8+
jar -cvf bundle.jar sqlite-android-3500400.pom sqlite-android-3500400.pom.asc sqlite-android-3500400.aar sqlite-android-3500400.aar.asc

third-party/sqlite-android/sqlite-android-3450200.pom renamed to third-party/sqlite-android/sqlite-android-3500400.pom

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>mil.nga</groupId>
44
<artifactId>sqlite-android</artifactId>
5-
<version>3450200</version>
5+
<version>3500400</version>
66
<packaging>aar</packaging>
77
<name>SQLite Android Bindings</name>
88
<description>SQLite Android Bindings from https://sqlite.org</description>
@@ -20,19 +20,25 @@
2020
</organization>
2121
<developers>
2222
<developer>
23-
<id>bosborn</id>
24-
<name>Brian Osborn</name>
25-
<email>bosborn@caci.com</email>
26-
<organizationUrl>https://www.caci.com/bit-systems</organizationUrl>
23+
<id>nruss11-om</id>
24+
<name>Nathan Russell</name>
25+
<email>nathan.russell@omnifederal.com</email>
26+
<organizationUrl>https://omnifederal.com/</organizationUrl>
2727
<roles>
2828
<role>developer</role>
2929
</roles>
30-
<timezone>UTC-07</timezone>
30+
<timezone>UTC-05</timezone>
3131
</developer>
3232
</developers>
3333
<scm>
3434
<connection>scm:fossil:https://www.sqlite.org/src</connection>
3535
<developerConnection>scm:fossil:https://www.sqlite.org/src</developerConnection>
3636
<url>https://www.sqlite.org/src</url>
3737
</scm>
38+
<distributionManagement>
39+
<repository>
40+
<id>ossrh-staging-api</id>
41+
<url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
42+
</repository>
43+
</distributionManagement>
3844
</project>

0 commit comments

Comments
 (0)