Skip to content

Commit

Permalink
Andriod Source Animedex
Browse files Browse the repository at this point in the history
The Andriod App Source Code For The Website Animedex
  • Loading branch information
skgupta507 committed Mar 3, 2024
0 parents commit 9757bc9
Show file tree
Hide file tree
Showing 210 changed files with 15,505 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/firebase-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: firebase-testing
on: [push, workflow_dispatch]
jobs:
test-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up gcloud Cloud SDK environment
# You may pin to the exact commit or the version.
# uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
uses: google-github-actions/[email protected]
with:
# Version of the gcloud SDK to install. If unspecified or set to "latest", the latest available gcloud SDK version for the target platform will be installed. Example: "290.0.1".
version: latest
# Service account email address to use for authentication. This is required for legacy .p12 keys but can be omitted for .json keys. This is usually of the format <name>@<project-id>.iam.gserviceaccount.com.

# Service account key to use for authentication. This should be the JSON formatted private key which can be exported from the Cloud Console. The value can be raw or base64-encoded.
service_account_key: ${{ secrets.GCLOUD_KEY }}
# ID of the Google Cloud project. If provided, this will configure gcloud to use this project ID by default for commands. Individual commands can still override the project using the --project flag which takes precedence.
project_id: gn-test-firebase-test-lab
# Export the provided credentials as Google Default Application Credentials. This will make the credentials available to later steps via the GOOGLE_APPLICATION_CREDENTIALS environment variable. Future steps that consume Default Application Credentials will automatically detect and use these credentials.
export_default_credentials: true

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Copying the appConfig file from androidTest to main
run: cp -f ./app/src/androidTest/assets/appConfig.json ./app/src/main/assets/appConfig.json

- name: Add dependencies in app/build.gradle
run: sed -i "s/dependencies *\n*{/dependencies {\nandroidTestImplementation 'androidx.test.ext:junit:1.1.2'\nandroidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'\nandroidTestImplementation 'androidx.test.espresso:espresso-contrib:3.3.0'\nandroidTestImplementation 'androidx.test.espresso:espresso-web:3.3.0'\nandroidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'\n/" ./app/build.gradle

- name: Add test runner in defaultConfig in app/build.gradle
run: sed -i "s/defaultConfig *\n*{/defaultConfig {\ntestInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'/" ./app/build.gradle

- name: Adding Helper method in GoNativeWebviewClient.java
run: sed -i "s/super.onPageFinished *( *view *, *url *) *;/super.onPageFinished(view, url);\nHelperClass.newLoad++;/" ./app/src/normal/java/io/gonative/android/GoNativeWebviewClient.java

- name: Copying HelperClass.java from androidTest/assets to normal/java/io/gonative/android/
run: cp -f ./app/src/androidTest/assets/HelperClass.java ./app/src/normal/java/io/gonative/android/HelperClass.java

- name: Build the App
run: ./gradlew assembleDebug assembleAndroidTest

- name: Testing the App
run: gcloud firebase test android run --type instrumentation --app ./app/build/outputs/apk/normal/debug/app-normal-debug.apk --test ./app/build/outputs/apk/androidTest/normal/debug/app-normal-debug-androidTest.apk --device model=flo,version=21,locale=en,orientation=portrait --device model=hammerhead,version=23,locale=en,orientation=portrait --device model=griffin,version=24,locale=en,orientation=portrait --device model=G8142,version=25,locale=en,orientation=portrait --device model=star2qlteue,version=26,locale=en,orientation=portrait --device model=walleye,version=27,locale=en,orientation=portrait --device model=OnePlus5T,version=28,locale=en,orientation=portrait --device model=x1q,version=29,locale=en,orientation=portrait --device model=flame,version=30,locale=en,orientation=portrait --results-bucket cloud-test-gn-test-firebase-test-lab --timeout 300s
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*~
.idea/
.gradle/
*.iml
local.properties
app/build/
build/
captures/
.DS_Store
plugins/
Binary file added AppIcon
Binary file not shown.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Changelog

## 2014-01-04

- Fix a crash on reload with no page loaded.

## 2015-01-02

- Update to latest gradle and build tools versions, making the project compatible with Android Studio 1.0.
- Fix bugs related to syncing of tabs with sidebar menu.

## 2014-12-23

- Allow setting of viewport while preserving ability to zoom.
- Allow dynamic config of navigation title image URLs.
- Various bug fixes involving javascript after page load, and tab coloring, tab animations, and a crash on application resume.

## 2014-12-22

- Fix various threading bugs where UI methods were called from non-UI threads.

## 2014-12-05

- Support showing the navigation title image on specific URLs.

## 2014-12-03

- Support customizing user agent per URL.
- Add color styling options for tabs.

## 2014-11-30

- New tabs with better material design and animations.
- Fix some automatic icon generation scripts.

## 2014-11-26

- Fix a crash involving webview pools.

## 2014-11-25

- Add support for custom actions in action bar.
Binary file added HeaderImage
Binary file not shown.
Binary file added NotificationIcon
Binary file not shown.
1 change: 1 addition & 0 deletions REVISION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bea6b380227dae2dae6694deb038c7a854605c80
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
184 changes: 184 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
import groovy.json.JsonSlurper

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
//[enabled by builder] apply plugin: 'com.google.gms.google-services'
//[enabled by builder] apply plugin: 'com.google.firebase.crashlytics'

ext {
fbAppId = ""
fbClientToken = ""
onesignalAppId = ""
adMobAppId = ""
googleServiceInvalid = "false"
auth0Domain = ""
auth0Scheme = ""
}

task parseAppConfig {
def jsonFile = file('src/main/assets/appConfig.json')
def parsedJson = new JsonSlurper().parseText(jsonFile.text)
if (parsedJson.services.facebook) {
if (parsedJson.services.facebook.appId) {
fbAppId = parsedJson.services.facebook.appId
}
if (parsedJson.services.facebook.clientToken) {
fbClientToken = parsedJson.services.facebook.clientToken
}
}
if (parsedJson.services.socialLogin && parsedJson.services.socialLogin.facebookLogin) {
if (parsedJson.services.socialLogin.facebookLogin.appId) {
fbAppId = parsedJson.services.socialLogin.facebookLogin.appId
}
if (parsedJson.services.socialLogin.facebookLogin.clientToken) {
fbClientToken = parsedJson.services.socialLogin.facebookLogin.clientToken
}
}
if (parsedJson.services.oneSignal && parsedJson.services.oneSignal.applicationId) {
onesignalAppId = parsedJson.services.oneSignal.applicationId
}
if (parsedJson.services.admob && parsedJson.services.admob.admobAndroid && parsedJson.services.admob.admobAndroid.applicationId) {
adMobAppId = parsedJson.services.admob.admobAndroid.applicationId
}
if (parsedJson.services.braze) {
if (parsedJson.services.braze.androidApiKey) {
gradle.ext.set("braze_api_key", parsedJson.services.braze.androidApiKey)
}
if (parsedJson.services.braze.androidEndpointKey) {
gradle.ext.set("braze_endpoint_key", parsedJson.services.braze.androidEndpointKey)
}
}
if (parsedJson.services.auth0) {
if (parsedJson.services.auth0.domain) {
auth0Domain = parsedJson.services.auth0.domain
}
if (parsedJson.services.auth0.scheme) {
auth0Scheme = parsedJson.services.auth0.scheme
}
}
}

task checkGoogleService {
plugins.withId("com.google.gms.google-services") {
def googleServiceJsonFile = file('google-services.json')
if (project.file(googleServiceJsonFile).exists()) {
if (googleServiceJsonFile.text.isEmpty()) {
googleServiceInvalid = "true"
}
} else {
googleServiceInvalid = "true"
}
}
}

build.dependsOn parseAppConfig
build.dependsOn checkGoogleService

android {
defaultConfig {
compileSdk 34
minSdkVersion 23
targetSdkVersion 34
applicationId "co.median.android.lnooda"
versionCode 6
multiDexEnabled true
vectorDrawables.useSupportLibrary = true

manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: onesignalAppId,
onesignal_google_project_number: "",
admob_app_id: adMobAppId,
facebook_app_id: fbAppId,
facebook_client_token: fbClientToken,
auth0Domain: auth0Domain, auth0Scheme: auth0Scheme ]
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

signingConfigs {
release {
storeFile file("../../release.keystore")
storePassword "password"
keyAlias "release"
keyPassword "password"
}
upload {
storeFile file("../../upload.keystore")
storePassword "password"
keyAlias "upload"
keyPassword "password"
}
}

buildTypes {
debug {
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
zipAlignEnabled true
debuggable project.getProperties().get("enableLogsInRelease").toBoolean()
signingConfig signingConfigs.release
}
upload {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
zipAlignEnabled true
matchingFallbacks = ['release']
debuggable project.getProperties().get("enableLogsInRelease").toBoolean()
signingConfig signingConfigs.upload
}
buildTypes.each {
it.buildConfigField 'boolean', 'GOOGLE_SERVICE_INVALID', googleServiceInvalid
}
}

flavorDimensions "webview"

productFlavors {
normal {
dimension "webview"
}
}
namespace 'co.median.android'
testNamespace '${applicationId}.test'
buildFeatures {
buildConfig true
}
}

dependencies {
/**** dependencies used by all apps ****/
implementation "androidx.core:core-ktx:1.12.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.squareup:seismic:1.0.2'
implementation 'androidx.webkit:webkit:1.10.0'
implementation 'androidx.core:core-splashscreen:1.0.1'
implementation "com.github.gonativeio:gonative-icons:$iconsVersion"
implementation "com.github.gonativeio:gonative-android-core:$coreVersion"
/**** end all apps ****/

/**** add-on module dependencies ****/
/**** end modules ****/

/**** Google Android and Play Services dependencies ****/
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.browser:browser:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation "androidx.drawerlayout:drawerlayout:1.2.0"
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
/**** end google ****/

/**** local dependencies ****/
implementation fileTree(dir: 'libs', include: '*.jar')
implementation fileTree(dir: 'libs', include: '*.aar')
/**** end local ****/
}

apply from: file("../plugins.gradle"); applyNativeModulesAppBuildGradle(project)
60 changes: 60 additions & 0 deletions app/proguard-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# 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 *;
#}

# webview interfaces

-keepclassmembers class co.median.android.ProfilePicker$ProfileJsBridge {
<methods>;
}
-keepclassmembers class co.median.android.MainActivity$StatusCheckerBridge {
<methods>;
}
-keepattributes JavascriptInterface

# stuff for google play services
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}

# Google Cloud Messaging
-keep class com.google.android.gms.** { *; }
-keep interface com.google.android.gms.** { *; }

# appcompat library
-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
4 changes: 4 additions & 0 deletions app/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- Ignores minSdk 18 requirement error during build -->
<manifest xmlns:tools="http://schemas.android.com/tools">
<uses-sdk tools:overrideLibrary="android_libs.ub_uiautomator"/>
</manifest>
5 changes: 5 additions & 0 deletions app/src/androidTest/assets/HelperClass.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package io.median.android;

public class HelperClass {
public volatile static int newLoad = 0;
}
Loading

0 comments on commit 9757bc9

Please sign in to comment.