diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml new file mode 100644 index 0000000..a295417 --- /dev/null +++ b/.github/workflows/android-ci.yml @@ -0,0 +1,48 @@ +name: Android CI + +env: + # The name of the main module repository + main_project_module: app + + # The name of the Play Store + playstore_name: Altimit + +on: + # Triggers the workflow on push or pull request events but only for default and protected branches + push: + branches: [ master ] + pull_request: + branches: [ master ] + + workflow_dispatch: + # The workflow will be dispatched to the default queue + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + # Set Current Date As Env Variable + - name: Set current date as env variable + run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + # Set Repository Name As Env Variable + - name: Set repository name as env variable + run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV + + - name: Set Up JDK + uses: actions/setup-java@v4 + with: + distribution: 'zulu' # See 'Supported distributions' for available options + java-version: '17' + cache: 'gradle' + + - name: Change wrapper permissions + run: chmod +x ./gradlew + + # Run Build Project + - name: Build gradle project + run: ./gradlew build \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 02bb721..fb65449 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,10 +14,11 @@ * limitations under the License. */ -apply plugin: 'com.android.application' +plugins { + alias(libs.plugins.android.application) +} android { - /** * Advanced Configuration */ @@ -27,7 +28,10 @@ android { def FORCE_NO_AUDIO = false // Disables WebAudio // Android 9+ "Q" API 29 - def ANDROID_SDK_TARGET = 29 + def ANDROID_SDK_TARGET = 34 + + namespace 'systems.altimit.rpgmakermv' + compileSdk ANDROID_SDK_TARGET defaultConfig { @@ -56,7 +60,7 @@ android { productFlavors { webview { dimension "mv_android_client" - minSdkVersion 14 + minSdk 21 buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true" } @@ -64,16 +68,27 @@ android { // WARNING: As of February 2017 Crosswalk is no longer maintained https://crosswalk-project.org/blog/crosswalk-final-release.html zz_crosswalk { dimension "mv_android_client" - minSdkVersion 16 + minSdk 21 buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true" } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 + } + + buildFeatures { + buildConfig true + viewBinding true + } + } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.appcompat:appcompat:1.0.2' + implementation libs.appcompat zz_crosswalkImplementation 'org.xwalk:xwalk_core_library:23.53.589.4' } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 36fcf66..e850c7f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - - - + + android:theme="@style/AppTheme"> + android:exported="true" + android:launchMode="singleTask" + android:screenOrientation="sensorLandscape"> - - + + - - - + + + + + + android:host="@string/app_host" + android:scheme="@string/app_scheme" /> diff --git a/app/src/webview/java/systems/altimit/rpgmakermv/WebPlayerView.java b/app/src/webview/java/systems/altimit/rpgmakermv/WebPlayerView.java index eb97eae..36ff919 100644 --- a/app/src/webview/java/systems/altimit/rpgmakermv/WebPlayerView.java +++ b/app/src/webview/java/systems/altimit/rpgmakermv/WebPlayerView.java @@ -73,7 +73,7 @@ private void init(Context context) { WebSettings webSettings = getSettings(); webSettings.setAllowContentAccess(true); webSettings.setAllowFileAccess(true); - webSettings.setAppCacheEnabled(true); +// webSettings.setAppCacheEnabled(true); webSettings.setDatabaseEnabled(true); webSettings.setDatabasePath(context.getDir("database", Context.MODE_PRIVATE).getPath()); webSettings.setDomStorageEnabled(true); diff --git a/build.gradle b/build.gradle index a39985f..c59a908 100644 --- a/build.gradle +++ b/build.gradle @@ -14,27 +14,7 @@ * limitations under the License. */ -buildscript { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' - } -} - -allprojects { - repositories { - google() - jcenter() - - maven { - url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' - } - } -} - -task clean(type: Delete) { - delete rootProject.buildDir +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + alias(libs.plugins.android.application) apply false } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index f32badb..4b29016 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,22 @@ -android.enableJetifier=true +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. For more details, visit +# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m \ No newline at end of file +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true +android.enableJetifier=true \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..dc1552c --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,22 @@ +[versions] +agp = "8.7.2" +junit = "4.13.2" +junitVersion = "1.2.1" +espressoCore = "3.6.1" +appcompat = "1.0.2" +material = "1.12.0" +activity = "1.9.3" +constraintlayout = "2.2.0" + +[libraries] +junit = { group = "junit", name = "junit", version.ref = "junit" } +ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } +espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } +appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } +material = { group = "com.google.android.material", name = "material", version.ref = "material" } +activity = { group = "androidx.activity", name = "activity", version.ref = "activity" } +constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" } + +[plugins] +android-application = { id = "com.android.application", version.ref = "agp" } + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 39d31d4..fa84388 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jul 09 12:09:06 BST 2019 +#Mon Nov 18 08:07:47 WIB 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 9d495b3..6897cba 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,31 @@ +pluginManagement { + repositories { + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } + mavenCentral() + gradlePluginPortal() + jcenter() + maven { + url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' + } + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + jcenter() + + maven { + url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' + } + } +} + include ':app' \ No newline at end of file