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
48 changes: 48 additions & 0 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 21 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
* limitations under the License.
*/

apply plugin: 'com.android.application'
plugins {
alias(libs.plugins.android.application)
}

android {

/**
* Advanced Configuration
*/
Expand All @@ -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 {

Expand Down Expand Up @@ -56,24 +60,35 @@ android {
productFlavors {
webview {
dimension "mv_android_client"
minSdkVersion 14
minSdk 21

buildConfigField "boolean", "BOOTSTRAP_INTERFACE", "true"
}

// 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'
}
35 changes: 18 additions & 17 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (c) 2017-2018 Altimit Community Contributors

Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,34 +13,36 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="systems.altimit.rpgmakermv">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:label="@string/app_name"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/app_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/app_icon_round"
android:theme="@style/AppTheme"
android:allowBackup="true"
android:fullBackupContent="true">
android:theme="@style/AppTheme">

<activity
android:name=".WebPlayerActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:screenOrientation="sensorLandscape"
android:launchMode="singleTask">
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data
android:scheme="@string/app_scheme"
android:host="@string/app_host" />
android:host="@string/app_host"
android:scheme="@string/app_scheme" />
</intent-filter>
</activity>
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
26 changes: 3 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
23 changes: 21 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
# 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
22 changes: 22 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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" }

6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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'