Skip to content
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
31 changes: 30 additions & 1 deletion .github/workflows/flutter_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Flutter Plugin CI

on:
push:
branches: [main, config/ci]
branches: [main, migrate/gradle]
pull_request:
branches: [main]

Expand All @@ -13,6 +13,12 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

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

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
Expand All @@ -32,6 +38,29 @@ jobs:
working-directory: example
run: flutter build apk --debug

- name: List .so 16KB page-size compatibility
shell: bash
run: |
APK="example/build/app/outputs/flutter-apk/app-debug.apk"
unzip -o "$APK" -d output_apk >/dev/null

while IFS= read -r -d '' so; do
aligns=$(readelf -Wl "$so" | awk '/Program Headers/{ph=1} ph && /LOAD/ {for (i=1;i<=NF;i++) if ($i=="Align") print $(i+1)}')
ok=true
for a in $aligns; do
if [[ "$a" =~ ^0x ]]; then val=$((a)); else val=$a; fi
if [ "$val" -lt 16384 ]; then
ok=false
break
fi
done
if $ok; then
echo "[OK] $so (16KB SAFE)"
else
echo "[FAIL] $so (NOT 16KB SAFE)"
fi
done < <(find output_apk -name "*.so" -print0)

build_ios:
runs-on: macos-latest
steps:
Expand Down
27 changes: 12 additions & 15 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@ group 'com.w3conext.jailbreak_root_detection'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.9.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:8.7.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
ext.kotlin_version = '2.2.0'
}

allprojects {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
Expand All @@ -29,13 +21,15 @@ android {
namespace 'com.w3conext.jailbreak_root_detection'
}

compileSdkVersion 36

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
jvmTarget = "17"
}

sourceSets {
Expand All @@ -44,13 +38,16 @@ android {

defaultConfig {
minSdkVersion 21
compileSdk 33
}


lintOptions {
disable 'InvalidPackage'
}

}

dependencies {
implementation "androidx.annotation:annotation:1.9.1"
implementation 'com.scottyab:rootbeer-lib:0.1.1'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
}
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2"
}
21 changes: 21 additions & 0 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,22 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "com.android.library" version "8.6.0" apply false
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}

dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = 'jailbreak_root_detection'
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4 changes: 2 additions & 2 deletions example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.22" apply false
id "com.android.application" version "8.6.0" apply false
id 'org.jetbrains.kotlin.android' version "2.1.0" apply false
}

include ":app"
Loading