Skip to content

Commit 3550ac2

Browse files
committed
cleanup deployment and use aar instead of jar
1 parent c2b6394 commit 3550ac2

9 files changed

Lines changed: 114 additions & 223 deletions

File tree

.github/actions/tools/uploadToCentral.sh

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/actions/tools/uploadToMaven.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ jobs:
5353
fi
5454
./gradlew $version_args --no-daemon assemble --console=plain --stacktrace
5555
56-
- name: Upload Maven-ready jar outputs
56+
- name: Upload AAR output
5757
uses: actions/upload-artifact@v7.0.1
5858
with:
59-
name: build-libs
60-
path: build/libs
59+
name: aar
60+
path: build/outputs/aar
6161

6262
PublishSnapshot:
6363
name: Deploy Snapshot
@@ -147,28 +147,24 @@ jobs:
147147
-PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
148148
-PreleaseVersion=${GITHUB_REF_NAME#v} \
149149
--console=plain --stacktrace
150-
.github/actions/tools/uploadToCentral.sh \
151-
-p '${{ secrets.OSSRH_PASSWORD }}' \
152-
-u '${{ secrets.OSSRH_USERNAME }}'
153150
fi
154151
155152
- name: Publish to GitHub Packages
156153
run: |
157154
export ANDROID_NDK="$ANDROID_SDK_ROOT/ndk/$ANDROID_NDK_VERSION"
158155
if [ "${{ secrets.SIGNING_PASSWORD }}" = "" ];
159156
then
160-
./gradlew publishMavenPublicationToDistRepository \
157+
./gradlew publishMavenPublicationToGitHubPackagesRepository \
161158
-PreleaseVersion=${GITHUB_REF_NAME#v} \
159+
-PgithubPackagesUsername='${{ github.actor }}' \
160+
-PgithubPackagesPassword='${{ secrets.GITHUB_TOKEN }}' \
162161
--console=plain --stacktrace
163162
else
164-
./gradlew publishMavenPublicationToDistRepository \
163+
./gradlew publishMavenPublicationToGitHubPackagesRepository \
165164
-PsigningKey='${{ secrets.SIGNING_KEY }}' \
166165
-PsigningPassword='${{ secrets.SIGNING_PASSWORD }}' \
167166
-PreleaseVersion=${GITHUB_REF_NAME#v} \
167+
-PgithubPackagesUsername='${{ github.actor }}' \
168+
-PgithubPackagesPassword='${{ secrets.GITHUB_TOKEN }}' \
168169
--console=plain --stacktrace
169170
fi
170-
171-
source .github/actions/tools/uploadToMaven.sh
172-
registry="https://maven.pkg.github.com/$GITHUB_REPOSITORY"
173-
echo "Deploy to github package registry $registry"
174-
uploadAllToMaven build/dist/maven/ "$registry" "token" "${{ secrets.GITHUB_TOKEN }}"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This project is extracted from the old `jme3-android-native` module so the Andro
88
implementation "org.jmonkeyengine:jme3-android-native:<version>"
99
```
1010

11-
`./gradlew assemble` builds the native libraries from source and packages them into the jar. An Android NDK and CMake must be available.
11+
`./gradlew assemble` builds the native libraries from source and packages them into an Android AAR. An Android SDK, Android NDK, and CMake must be available.
1212

1313
Native build targets are configured in `gradle.properties`:
1414

bufferallocator.gradle

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,3 @@ task buildBufferAllocatorNativeLib(type: Exec, dependsOn: [copyJmeBufferAllocato
3333
"-j${Runtime.runtime.availableProcessors()}"
3434
)
3535
}
36-
compileJava.dependsOn buildBufferAllocatorNativeLib
37-
38-
// package the native object files inside the lib folder in a production jar
39-
jar.into("lib") { from bufferAllocatorBuildLibsDir }
40-
jar.doFirst {
41-
rootProject.ext.androidAbis.each { abi ->
42-
def nativeLib = file("${bufferAllocatorBuildLibsDir}/${abi}/libbufferallocatorjme.so")
43-
if (!nativeLib.isFile()) {
44-
throw new GradleException("Missing buffer allocator native library: ${nativeLib}. Run assemble with an Android NDK available.")
45-
}
46-
}
47-
}

0 commit comments

Comments
 (0)