Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update structure #3

Merged
merged 1 commit into from
Mar 15, 2024
Merged
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
25 changes: 24 additions & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,29 @@ jobs:
path: diffuse-source-file-release
key: diffuse-${{ github.sha }}-${{ hashFiles('**/aar/**.aar') }}

- run: cp rootbeerlib/build/outputs/aar/rootbeerlib-release.aar diffuse-source-file-release
- run: cp rootbeer-core/build/outputs/aar/rootbeer-core-release.aar diffuse-source-file-release
if: github.event_name != 'pull_request'
shell: bash

build-sample-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- name: Assemble sample app
uses: gradle/gradle-build-action@v3
with:
build-root-directory: sample
arguments: assemble check

- uses: actions/upload-artifact@v4
with:
name: apk
path: sample/app/build/outputs/apk/release/*.apk
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.event_name == 'pull_request'
uses: usefulness/dependency-tree-diff-action@v2
with:
project: 'rootbeerlib'
project: 'rootbeerlib-core'
configuration: releaseRuntimeClasspath

- uses: peter-evans/find-comment@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_diffuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: usefulness/diffuse-action@v1
with:
old-file-path: diffuse-source-file-release
new-file-path: rootbeerlib/build/outputs/aar/rootbeerlib-release.aar
new-file-path: rootbeer-core/build/outputs/aar/rootbeer-core-release.aar

- uses: peter-evans/find-comment@v3
id: find_comment
Expand Down
19 changes: 0 additions & 19 deletions RootChecker.iml

This file was deleted.

25 changes: 0 additions & 25 deletions app/proguard-rules.pro

This file was deleted.

1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plugins {
alias(libs.plugins.starter.config)
alias(libs.plugins.starter.versioning)
alias(libs.plugins.starter.library.android) apply false
alias(libs.plugins.starter.application.android) apply false
}

commonConfig {
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ constraintlayout = "2.1.4"
java-compilation = "21"
gradle-starter = "0.71.0"
gradle-doctor = "0.9.2"
gradle-easylauncher = "6.3.0"
library = "2.4.0"
material = "1.11.0"
maven-junit = "5.10.2"
Expand Down Expand Up @@ -33,3 +34,4 @@ starter-library-kotlin = { id = "com.starter.library.kotlin", version.ref = "gra
osacky-doctor = { id = "com.osacky.doctor", version.ref = "gradle-doctor" }
starter-application-android = { id = "com.starter.application.android", version.ref = "gradle-starter" }
kotlinx-binarycompatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "maven-binarycompatiblity" }
starter-easylauncher = { id = "com.starter.easylauncher", version.ref = "gradle-easylauncher" }
File renamed without changes.
4 changes: 2 additions & 2 deletions rootbeerlib/build.gradle → rootbeer-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ androidComponents {
}

tasks.withType(JavaCompile).configureEach {
options.headerOutputDirectory.set(rootProject.file("rootbeerlib/src/main/jni"))
options.headerOutputDirectory.set(layout.projectDirectory.file("src/main/jni").asFile)
}

tasks.withType(Test).configureEach {
useJUnitPlatform()
}

dependencies {
compileOnly libs.androidx.annotation
compileOnly(libs.androidx.annotation)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project("rootbeerlib")
project("rootbeer-jni")
cmake_minimum_required(VERSION 3.4.1)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-all")
Expand Down
27 changes: 20 additions & 7 deletions app/build.gradle → sample/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
alias(libs.plugins.starter.application.android)
alias(libs.plugins.starter.easylauncher)
}

android {
Expand All @@ -10,31 +11,43 @@ android {
versionName "0.9"
minSdk 26
}

signingConfigs {
named("debug") {
storeFile rootProject.file("keys/debug.keystore")
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
named("debug") {
signingConfig signingConfigs.getByName("debug")
applicationIdSuffix ".debug"
minifyEnabled false
versionNameSuffix "-debug"
}
release {
minifyEnabled true
named("release") {
signingConfig signingConfigs.getByName("debug")
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
}
}
buildFeatures {
buildConfig = true
viewBinding = true
}
lint {
disable("SetTextI18n")
disable("HardcodedText")
}
}

dependencies {
implementation project(':rootbeerlib')
implementation("io.github.usefulness:rootbeer-core")

implementation(libs.kotlinx.coroutines.android)
implementation(libs.androidx.core)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.constraintlayout)
implementation(libs.google.material)
implementation(libs.nineoldandroids.library)
implementation(libs.barbuzz.beerprogressview)
}
Empty file added sample/app/proguard-rules.pro
Empty file.
9 changes: 9 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
plugins {
alias(libs.plugins.starter.config)
alias(libs.plugins.starter.application.android) apply false
alias(libs.plugins.starter.library.android) apply false
}

commonConfig {
javaVersion JavaVersion.VERSION_11
}
6 changes: 6 additions & 0 deletions sample/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
org.gradle.jvmargs="-XX:+UseParallelGC"
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.vfs.watch=true
android.useAndroidX=true
android.nonTransitiveRClass=true
Binary file added sample/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions sample/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading