Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build-and-upload-aar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Upload AAR

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build AAR
run: ./gradlew sourceJar

- name: Upload AAR to Release
uses: softprops/action-gh-release@v2
with:
files: killerbee/build/outputs/aar/killerbee-release.aar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.10.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down Expand Up @@ -35,7 +35,7 @@ allprojects {
}
}

task clean(type: Delete) {
tasks.register('clean', Delete) {
delete rootProject.buildDir
}

Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
kotlin.code.style=official
android.nonTransitiveRClass=true
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
5 changes: 3 additions & 2 deletions killerbee/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ def LIB_VERSION = '1.1.0'
def githubProperties = new Properties()
githubProperties.load(new FileInputStream(rootProject.file("github.properties")))

task sourceJar(type: Jar) {
tasks.register('sourceJar', Jar) {
archiveClassifier = 'sources'
from android.sourceSets.main.java.srcDirs
classifier "sources"
from android.sourceSets.main.kotlin.srcDirs
}

publishing {
Expand Down