Skip to content

Commit d9d3485

Browse files
committed
Merge remote-tracking branch 'rohit/capacitor' into capacitor
2 parents 52b34d2 + 07e9738 commit d9d3485

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2323
-61
lines changed

.vscode/plugins.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

android/.gitignore

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
2+
3+
# Built application files
4+
*.apk
5+
*.aar
6+
*.ap_
7+
*.aab
8+
9+
# Files for the ART/Dalvik VM
10+
*.dex
11+
12+
# Java class files
13+
*.class
14+
15+
# Generated files
16+
bin/
17+
gen/
18+
out/
19+
# Uncomment the following line in case you need and you don't have the release build type files in your app
20+
# release/
21+
22+
# Gradle files
23+
.gradle/
24+
build/
25+
26+
# Local configuration file (sdk path, etc)
27+
local.properties
28+
29+
# Proguard folder generated by Eclipse
30+
proguard/
31+
32+
# Log Files
33+
*.log
34+
35+
# Android Studio Navigation editor temp files
36+
.navigation/
37+
38+
# Android Studio captures folder
39+
captures/
40+
41+
# IntelliJ
42+
*.iml
43+
.idea/workspace.xml
44+
.idea/tasks.xml
45+
.idea/gradle.xml
46+
.idea/assetWizardSettings.xml
47+
.idea/dictionaries
48+
.idea/libraries
49+
# Android Studio 3 in .gitignore file.
50+
.idea/caches
51+
.idea/modules.xml
52+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
53+
.idea/navEditor.xml
54+
55+
# Keystore files
56+
# Uncomment the following lines if you do not want to check your keystore files in.
57+
#*.jks
58+
#*.keystore
59+
60+
# External native build folder generated in Android Studio 2.2 and later
61+
.externalNativeBuild
62+
.cxx/
63+
64+
# Google Services (e.g. APIs or Firebase)
65+
# google-services.json
66+
67+
# Freeline
68+
freeline.py
69+
freeline/
70+
freeline_project_description.json
71+
72+
# fastlane
73+
fastlane/report.xml
74+
fastlane/Preview.html
75+
fastlane/screenshots
76+
fastlane/test_output
77+
fastlane/readme.md
78+
79+
# Version control
80+
vcs.xml
81+
82+
# lint
83+
lint/intermediates/
84+
lint/generated/
85+
lint/outputs/
86+
lint/tmp/
87+
# lint/reports/
88+
89+
# Android Profiling
90+
*.hprof
91+
92+
# Cordova plugins for Capacitor
93+
capacitor-cordova-android-plugins
94+
95+
# Copied web assets
96+
app/src/main/assets/public
97+
98+
# Generated Config files
99+
app/src/main/assets/capacitor.config.json
100+
app/src/main/assets/capacitor.plugins.json
101+
app/src/main/res/xml/config.xml

android/app/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build/*
2+
!/build/.npmkeep

android/app/build.gradle

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
apply plugin: 'com.android.application'
2+
apply from: 'capacitor.build.gradle'
3+
apply plugin: 'org.jetbrains.kotlin.android'
4+
5+
android {
6+
kotlinOptions {
7+
jvmTarget = '21'
8+
}
9+
10+
namespace "com.foxdebug.acode"
11+
compileSdk rootProject.ext.compileSdkVersion
12+
android.buildFeatures.buildConfig true
13+
defaultConfig {
14+
applicationId "com.foxdebug.acode"
15+
16+
17+
//sdk versions and other stuff should be changed from variables.build.gradle
18+
minSdkVersion rootProject.ext.minSdkVersion
19+
targetSdkVersion rootProject.ext.targetSdkVersion
20+
21+
//fdroid expect this as literals so no fancy logic
22+
versionCode 957
23+
versionName "1.11.1"
24+
25+
flavorDimensions += "default"
26+
productFlavors{
27+
free{
28+
applicationId = "com.foxdebug.acodefree"
29+
dimension = "default"
30+
buildConfigField("boolean", "PAID", "false")
31+
}
32+
33+
paid{
34+
applicationId = "com.foxdebug.acode"
35+
dimension = "default"
36+
buildConfigField("boolean", "PAID", "true")
37+
}
38+
}
39+
40+
41+
aaptOptions {
42+
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
43+
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
44+
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
45+
}
46+
}
47+
48+
buildTypes {
49+
release {
50+
minifyEnabled false
51+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
52+
}
53+
}
54+
}
55+
56+
repositories {
57+
flatDir{
58+
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
59+
}
60+
}
61+
62+
dependencies {
63+
implementation fileTree(include: ['*.jar'], dir: 'libs')
64+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
65+
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
66+
implementation project(':capacitor-android')
67+
implementation project(':capacitor-cordova-android-plugins')
68+
69+
//sftp
70+
implementation "com.sshtools:maverick-synergy-client:3.1.2"
71+
}
72+
73+
74+
75+
try {
76+
def servicesJSON = file('google-services.json')
77+
if (servicesJSON.text) {
78+
apply plugin: 'com.google.gms.google-services'
79+
}
80+
} catch(Exception e) {
81+
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
82+
}

android/app/capacitor.build.gradle

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
2+
3+
android {
4+
compileOptions {
5+
sourceCompatibility JavaVersion.VERSION_21
6+
targetCompatibility JavaVersion.VERSION_21
7+
}
8+
}
9+
10+
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
11+
dependencies {
12+
implementation project(':capacitor-app')
13+
implementation project(':capacitor-filesystem')
14+
implementation "androidx.webkit:webkit:1.4.0"
15+
implementation "commons-net:commons-net:3.11.1"
16+
implementation "com.android.billingclient:billing:6.0.1"
17+
implementation "commons-io:commons-io:2.11.0"
18+
implementation "commons-codec:commons-codec:1.10"
19+
implementation "androidx.documentfile:documentfile:1.0.1"
20+
implementation "org.nanohttpd:nanohttpd:+"
21+
implementation "androidx.documentfile:documentfile:1.0.1"
22+
implementation "commons-io:commons-io:2.11.0"
23+
implementation "com.sshtools:maverick-synergy-client:3.1.2"
24+
implementation "com.sshtools:maverick-bc:3.1.2"
25+
implementation "androidx.core:core:1.6.0"
26+
implementation "androidx.core:core-google-shortcuts:1.0.0"
27+
}
28+
apply from: "../../node_modules/cordova-plugin-buildinfo/src/android/BuildInfo.gradle"
29+
30+
if (hasProperty('postBuildExtras')) {
31+
postBuildExtras()
32+
}

android/app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<application>
6+
7+
<meta-data
8+
android:name="com.google.android.gms.ads.APPLICATION_ID"
9+
tools:replace="android:value"
10+
android:value="ca-app-pub-5911839694379275~4255791238"/>
11+
12+
</application>
13+
14+
15+
</manifest>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="ic_launcher_background">@android:color/white</color>
4+
<color name="ic_splash_background">@android:color/white</color>
5+
</resources>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<!-- Permissions -->
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
8+
<application
9+
android:name=".Acode"
10+
android:allowBackup="true"
11+
android:icon="@mipmap/ic_launcher"
12+
android:label="@string/app_name"
13+
android:roundIcon="@mipmap/ic_launcher"
14+
android:supportsRtl="true"
15+
android:networkSecurityConfig="@xml/network_security_config"
16+
android:theme="@style/AppTheme"
17+
tools:targetApi="n">
18+
19+
<activity
20+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation"
21+
android:name=".MainActivity"
22+
android:label="@string/title_activity_main"
23+
android:theme="@style/AppTheme.NoActionBar"
24+
android:launchMode="singleTask"
25+
android:exported="true">
26+
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN" />
29+
<category android:name="android.intent.category.LAUNCHER" />
30+
</intent-filter>
31+
32+
</activity>
33+
34+
<provider
35+
android:name="androidx.core.content.FileProvider"
36+
android:authorities="${applicationId}.fileprovider"
37+
android:exported="false"
38+
android:grantUriPermissions="true">
39+
<meta-data
40+
android:name="android.support.FILE_PROVIDER_PATHS"
41+
android:resource="@xml/file_paths"/>
42+
</provider>
43+
</application>
44+
</manifest>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.foxdebug.acode
2+
3+
import android.app.Application
4+
5+
class Acode : Application() {
6+
companion object{
7+
lateinit var instance: Acode
8+
private set
9+
}
10+
override fun onCreate() {
11+
super.onCreate()
12+
instance = this
13+
}
14+
}

0 commit comments

Comments
 (0)