Skip to content

Commit

Permalink
v17.5.0
Browse files Browse the repository at this point in the history
- Migration from Cordova to Capacitor to bring compatibility to Android 13 and 14.
- Project restructuring.
- UI rendering tweaks (Svelte), layout improvements, and minor bug fixes.
  • Loading branch information
EdenwareApps committed Apr 12, 2024
1 parent 52ece97 commit 7ef547d
Show file tree
Hide file tree
Showing 1,228 changed files with 9,621 additions and 85,762 deletions.
96 changes: 45 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,10 @@
# Cordova Global
plugins/

# iOS Platform
platforms/ios/build/
platforms/ios/www/
platforms/ios/cordova/console.log
*.xcuserdatad

# Android Platform
platforms/android/.gradle
platforms/android/build
platforms/android/assets/www
platforms/android/local.properties
platforms/android/CordovaLib/build
platforms/android/CordovaLib/gen
platforms/android/CordovaLib/local.properties

# wp8
platforms/wp8/bin
platforms/wp8/obj
platforms/wp8/www
platforms/wp8/.staging
platforms/wp8/*.suo
platforms/wp8/*.csproj.user

# Windows Universal App (Windows Platform)
platforms/windows/build
platforms/windows/www
platforms/windows/AppPackages

# Electron
platforms/electron/build
platforms/electron/build-res
platforms/electron/www
platforms/electron/config.xml
platforms/electron/electron.json

# Browser
platforms/browser/www

# res
resources/signing
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Node JS + TS
logs
Expand Down Expand Up @@ -108,13 +72,43 @@ $RECYCLE.BIN/
.AppleDesktop
.apdisk

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Log/OS Files
*.log

# Android Studio generated files and folders
captures/
.externalNativeBuild/
.cxx/
*.apk
output.json

# IntelliJ
*.iml
.idea/

# Keystore files
*.jks
*.keystore

# Google Services (e.g. APIs or Firebase)
google-services.json

# Android Profiling
*.hprof

# Custom
www/.vscode
www/nodejs-project/modules/premium/
www/nodejs-project/node_modules/
www/nodejs-project/ffmpeg/*
www/nodejs-project/.arch
build-extras.gradle
www/nodejs-project/arch.dat
www/nodejs-project/run-node.cmd
www/nodejs-project/tool.html
www/nodejs/modules/premium/
www/nodejs/node_modules/
www/nodejs/ffmpeg/*
www/nodejs/.arch
www/nodejs/arch.dat
www/nodejs/tool.html
android/app/release/output-metadata.json
101 changes: 101 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore

# Built application files
*.apk
*.aar
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

# Android Profiling
*.hprof

# Cordova plugins for Capacitor
capacitor-cordova-android-plugins

# Copied web assets
app/src/main/assets/public

# Generated Config files
app/src/main/assets/capacitor.config.json
app/src/main/assets/capacitor.plugins.json
app/src/main/res/xml/config.xml
4 changes: 4 additions & 0 deletions android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
./release/
./debug/
/build/*
!/build/.npmkeep
74 changes: 74 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apply plugin: 'com.android.application'

android {
namespace "tv.megacubo.app"
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "tv.megacubo.app"
minSdk 24
targetSdkVersion 33
versionCode 471
versionName '17.5.0'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
splits {
abi {
enable true
reset()
include 'arm64-v8a', 'armeabi-v7a'
universalApk true
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
def abi = output.getFilter(com.android.build.OutputFile.ABI)
output.outputFileName = "Megacubo_${versionName}_android_${abi}.apk"
}
}
packagingOptions {
jniLibs {
useLegacyPackaging = true
}
}
}

repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}

apply from: 'capacitor.build.gradle'

try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}
29 changes: 29 additions & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-keep-awake')
implementation project(':capacitor-app')
implementation project(':capacitor-filesystem')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-share')
implementation project(':capacitor-status-bar')
implementation project(':eoscz-capacitor-plugin-native-file-downloader')
implementation project(':capacitor-nodejs')
implementation "androidx.core:core:1.0.0"
}
apply from: "../../node_modules/cordova-androidx-build/src/android/cordova-androidx-build.gradle"
apply from: "../../node_modules/cordova-plugin-brightsdk/src/android/BrightSDKHelper.gradle"
apply from: "../../node_modules/tv.megacubo.ffmpeg/src/android/FFmpegKit.gradle"
apply from: "../../../../../GitHub/tv.megacubo.player/src/android/megacubo.gradle"

if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
21 changes: 21 additions & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.getcapacitor.myapp;

import static org.junit.Assert.*;

import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {

@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();

assertEquals("com.getcapacitor.app", appContext.getPackageName());
}
}

0 comments on commit 7ef547d

Please sign in to comment.