Skip to content

Commit 68e9afb

Browse files
authored
Merge pull request #40 from theJawnnybot/feature/modern-stack-migration
Migrate to modern stack and Maven Central publishing
2 parents 827db24 + 8703870 commit 68e9afb

File tree

14 files changed

+329
-290
lines changed

14 files changed

+329
-290
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ jobs:
1010
- name: Checkout
1111
uses: actions/checkout@v4
1212

13-
- name: Validate Gradle Wrapper
14-
uses: gradle/wrapper-validation-action@v1
15-
1613
- name: Configure JDK
1714
uses: actions/setup-java@v4
1815
with:
1916
distribution: 'zulu'
2017
java-version: '17'
18+
cache: gradle
2119

2220
- name: Test
23-
run: ./gradlew assemble
21+
run: ./gradlew assemble

.github/workflows/publish-release.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
push:
55
tags:
66
- '*'
7+
78
env:
89
RELEASE_SIGNING_ENABLED: true
910

1011
jobs:
1112
publish:
12-
1313
runs-on: ubuntu-latest
1414
if: github.repository == 'Jawnnypoo/PhysicsLayout'
1515

@@ -20,16 +20,14 @@ jobs:
2020
- name: Install JDK
2121
uses: actions/setup-java@v4
2222
with:
23-
distribution: 'zulu'
24-
java-version: 17
25-
26-
- name: Set version
27-
run: sed -i "s/VERSION_NAME=0.0.1/VERSION_NAME=$GITHUB_REF_NAME/" gradle.properties
23+
distribution: zulu
24+
java-version: '17'
25+
cache: gradle
2826

2927
- name: Release to Maven Central
30-
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
28+
run: ./gradlew publishAndReleaseToMavenCentral -PVERSION_NAME="${GITHUB_REF_NAME}" --no-configuration-cache
3129
env:
32-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
33-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
30+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
31+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
3432
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
35-
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}
33+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See it in action with the sample app:
88
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.jawnnypoo/physicslayout/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.jawnnypoo/physicslayout)
99

1010
## Gradle
11-
```groovy
11+
```kotlin
1212
dependencies {
1313
implementation("com.jawnnypoo:physicslayout:latest.release.here")
1414
}
@@ -96,7 +96,7 @@ This library was designed with the intention of allowing for playful animations
9696
License
9797
--------
9898

99-
Copyright 2024 John Carlson
99+
Copyright 2025 John Carlson
100100

101101
Licensed under the Apache License, Version 2.0 (the "License");
102102
you may not use this file except in compliance with the License.

app/build.gradle.kts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
plugins {
2-
id("com.android.application")
3-
id("kotlin-android")
2+
alias(libs.plugins.android.application)
43
}
54

65
android {
76
namespace = "com.jawnnypoo.physicslayout.sample"
8-
compileSdk = 34
7+
compileSdk = 35
98

109
defaultConfig {
1110
applicationId = "com.jawnnypoo.physicslayout.sample"
1211
minSdk = 21
13-
targetSdk = 34
14-
versionCode = 101
15-
versionName = "1.0.1"
12+
targetSdk = 35
13+
versionCode = 102
14+
versionName = "1.0.2"
1615
}
1716

1817
buildFeatures {
@@ -23,15 +22,19 @@ android {
2322
getByName("release") {
2423
isMinifyEnabled = true
2524
isShrinkResources = true
26-
proguardFiles("proguard-rules.pro", getDefaultProguardFile("proguard-android.txt"))
25+
proguardFiles("proguard-rules.pro", getDefaultProguardFile("proguard-android-optimize.txt"))
2726
}
2827
getByName("debug") {
2928
isMinifyEnabled = false
3029
isShrinkResources = false
31-
proguardFiles("proguard-rules.pro", getDefaultProguardFile("proguard-android.txt"))
30+
proguardFiles("proguard-rules.pro", getDefaultProguardFile("proguard-android-optimize.txt"))
3231
}
3332
}
3433

34+
compileOptions {
35+
sourceCompatibility = JavaVersion.VERSION_17
36+
targetCompatibility = JavaVersion.VERSION_17
37+
}
3538
}
3639

3740
kotlin {
@@ -62,7 +65,6 @@ dependencies {
6265
exclude(group = "com.intellij", module = "annotations")
6366
}
6467

65-
6668
implementation(libs.gimbal)
6769

6870
implementation(project(":physicslayout"))

build.gradle.kts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
2-
alias(libs.plugins.com.android.application) apply false
3-
alias(libs.plugins.com.android.library) apply false
4-
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
5-
alias(libs.plugins.com.vanniktech.publish) apply false
2+
alias(libs.plugins.android.application) apply false
3+
alias(libs.plugins.android.library) apply false
4+
alias(libs.plugins.vanniktech.publish) apply false
65
}

gradle.properties

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
# Project-wide Gradle settings.
2-
3-
# IDE (e.g. Android Studio) users:
4-
# Gradle settings configured through the IDE *will override*
5-
# any settings specified in this file.
6-
7-
# For more details on how to configure your build environment visit
8-
# http://www.gradle.org/docs/current/userguide/build_environment.html
9-
10-
# Specifies the JVM arguments used for the daemon process.
11-
# The setting is particularly useful for tweaking memory settings.
12-
# Default value: -Xmx10248m -XX:MaxPermSize=256m
13-
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14-
15-
# When configured, Gradle will run in incubating parallel mode.
16-
# This option should only be used with decoupled projects. More details, visit
17-
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18-
# org.gradle.parallel=true
1+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
192
android.useAndroidX=true
203

214
GROUP=com.jawnnypoo
225
POM_ARTIFACT_ID=physicslayout
23-
POM_PACKAGING=aar
6+
VERSION_NAME=3.0.3
247

258
POM_NAME=PhysicsLayout
269
POM_DESCRIPTION=Android layout that simulates physics using JBox2D. Simply add views, enable physics, and watch them fall!
@@ -39,5 +22,5 @@ POM_DEVELOPER_ID=Jawnnypoo
3922
POM_DEVELOPER_NAME=John Carlson
4023
POM_DEVELOPER_URL=https://github.com/Jawnnypoo/
4124

42-
# This gets updated by CI
43-
VERSION_NAME=0.0.1
25+
SONATYPE_CONNECT_TIMEOUT_SECONDS=60
26+
SONATYPE_CLOSE_TIMEOUT_SECONDS=900

gradle/libs.versions.toml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
[versions]
2-
org-jetbrains-kotlin-android = "1.9.10"
3-
agp = "8.2.1"
4-
coroutines = "1.7.3"
5-
retrofit = "2.9.0"
2+
agp = "9.1.0"
3+
coroutines = "1.10.2"
64

75
[libraries]
86
jbox2d = { group = "org.jbox2d", name = "jbox2d-library", version = "2.2.1.1" }
97
translation-drag-view-helper = { group = "com.commit451", name = "translationviewdraghelper", version = "2.0.3" }
108

119
coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
12-
coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
10+
coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
1311

14-
androidx-activity = { group = "androidx.activity", name = "activity-ktx", version = "1.8.2" }
15-
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version = "1.6.1" }
16-
androidx-lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version = "2.7.0" }
12+
androidx-activity = { group = "androidx.activity", name = "activity-ktx", version = "1.10.1" }
13+
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version = "1.7.0" }
14+
androidx-lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version = "2.9.0" }
1715

18-
google-material = { group = "com.google.android.material", name = "material", version = "1.11.0" }
16+
google-material = { group = "com.google.android.material", name = "material", version = "1.12.0" }
1917

2018
circle-image-view = { group = "de.hdodenhof", name = "circleimageview", version = "3.1.0" }
2119

22-
coil = { group = "io.coil-kt", name = "coil", version = "2.5.0" }
20+
coil = { group = "io.coil-kt", name = "coil", version = "2.7.0" }
2321

24-
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
25-
retrofit-moshi = { group = "com.squareup.retrofit2", name = "converter-moshi", version.ref = "retrofit" }
22+
retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version = "2.11.0" }
23+
retrofit-moshi = { group = "com.squareup.retrofit2", name = "converter-moshi", version = "2.11.0" }
2624

27-
moshi = { group = "com.squareup.moshi", name = "moshi-kotlin", version = "1.13.0" }
25+
moshi = { group = "com.squareup.moshi", name = "moshi-kotlin", version = "1.15.2" }
2826

2927
flowlayout = { group = "com.wefika", name = "flowlayout", version = "0.4.1" }
3028

31-
gimbal = { group = "com.github.Commit451", name = "Gimbal", version = "3.0.0" }
32-
29+
gimbal = { group = "com.commit451", name = "gimbal", version = "3.1.0" }
3330

3431
[plugins]
35-
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "org-jetbrains-kotlin-android" }
36-
com-android-application = { id = "com.android.application", version.ref = "agp" }
37-
com-android-library = { id = "com.android.library", version.ref = "agp" }
38-
com-vanniktech-publish = { id = "com.vanniktech.maven.publish", version = "0.27.0" }
32+
android-application = { id = "com.android.application", version.ref = "agp" }
33+
android-library = { id = "com.android.library", version.ref = "agp" }
34+
vanniktech-publish = { id = "com.vanniktech.maven.publish", version = "0.30.0" }

gradle/wrapper/gradle-wrapper.jar

-12.7 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
7-
zipStorePath=wrapper/dists
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)