Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #110 from YTVanced/dev
Browse files Browse the repository at this point in the history
1.2.0 Update
  • Loading branch information
KevinX8 committed Aug 8, 2020
2 parents 90c457c + f6c13ef commit 3126260
Show file tree
Hide file tree
Showing 119 changed files with 3,205 additions and 2,756 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@ jobs:
with:
java-version: 1.8

- name: Write firebase config to file
run: echo $FIREBASE_CONFIG > app/google-services.json
env:
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}

- name: Grant rights
run: chmod +x ./gradlew

- name: Build project with Gradle
run: ./gradlew build

- name: Build Release APK with Gradle
- name: Build Debug APK with Gradle
run: ./gradlew assembleDebug

- name: Upload to GitHub
- name: Upload Debug
uses: actions/upload-artifact@v2
with:
name: 'Vanced-Manager'
name: 'Manager'
path: app/build/outputs/apk/debug/app-debug.apk
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
build/
out/
app/src/main/java/com/vanced/manager/core/base/DummyJava.java
app/google-services.json
local.properties
/.github/
*.iml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ After 3 months of development, we are finally ready to introduce Vanced Manager
- topjohnwu for his wonderful [LibSU](https://github.com/topjohnwu/libsu)
- Mindorks for their amazing [PRDownloader](https://github.com/MindorksOpenSource/PRDownloader)
- aefyr for [SAI](https://github.com/aefyr/SAI), which was an inspiration for our Manager
- 100rabhkr for their [GetJson](https://github.com/100rabhkr/getjson) library
- kittinunf for the [Fuel](https://github.com/kittinunf/Fuel) library
- cbeust for the [klaxon](https://github.com/cbeust/klaxon) library
40 changes: 28 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.firebase.crashlytics'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileSdkVersion 30
buildToolsVersion "30.0.1"

defaultConfig {
applicationId "com.vanced.manager"
minSdkVersion 21
targetSdkVersion 29
versionCode 11
versionName "1.1.0 (Big Sur)"
targetSdkVersion 30
versionCode 12
versionName "1.2.0 (Niko)"

vectorDrawables.useSupportLibrary = true
}
Expand Down Expand Up @@ -54,25 +57,38 @@ android {
}

dependencies {

// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

// AndroidX
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.activity:activity:1.1.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.core:core-ktx:1.3.0'
implementation 'androidx.core:core-ktx:1.3.1'
implementation 'androidx.fragment:fragment-ktx:1.2.5'
implementation 'androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.0'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'com.google.android.material:material:1.3.0-alpha02'

// Other
implementation 'com.github.100rabhkr:GetJSON:1.0'
implementation 'com.github.topjohnwu.libsu:core:2.5.1'
implementation 'com.beust:klaxon:5.3'
implementation 'com.crowdin.platform:mobile-sdk:1.1.6'
implementation 'com.github.kittinunf.fuel:fuel:2.2.3'
implementation 'com.github.kittinunf.fuel:fuel-coroutines:2.2.3'
implementation 'com.github.kittinunf.fuel:fuel-json:2.2.3'
implementation 'com.github.topjohnwu.libsu:core:3.0.1'
implementation 'com.google.firebase:firebase-messaging:20.2.4'
implementation 'com.google.firebase:firebase-perf:19.0.8'
implementation 'com.mindorks.android:prdownloader:0.6.0'
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.4'
implementation 'com.google.firebase:firebase-crashlytics:17.1.1'

}
23 changes: 18 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />


<application
android:name=".core.App"
Expand All @@ -18,8 +17,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:ignore="UnusedAttribute"
tools:replace="android:allowBackup">
tools:ignore="UnusedAttribute">

<activity
android:name=".ui.core.SplashScreenActivity"
Expand All @@ -38,7 +36,8 @@
</activity>
<activity
android:name=".ui.MainActivity"
android:label="@string/app_name" />
android:label="@string/app_name"
android:theme="@style/DarkTheme.Blue"/>

<meta-data
android:name="preloaded_fonts"
Expand All @@ -56,6 +55,20 @@

</provider>

<service
android:name=".core.firebase.CloudMessaging"
android:exported="false">

<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>

</service>

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_name" />

<service android:name=".core.installer.SplitInstallerService" />
<service android:name=".core.installer.RootSplitInstallerService" />
<service android:name=".core.installer.SplitInstaller" />
Expand Down
Binary file removed app/src/main/ic_launcher-playstore.png
Binary file not shown.
16 changes: 6 additions & 10 deletions app/src/main/java/com/vanced/manager/adapter/SectionPageAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ import com.vanced.manager.ui.fragments.VancedChangelogFragment

class SectionPageAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {

private val fragmentItems = 3
override fun getItemCount(): Int {
return fragmentItems
}
override fun getItemCount(): Int = 3

override fun createFragment(position: Int): Fragment {
var fragment: Fragment? = null
when (position) {
0 -> fragment = VancedChangelogFragment()
1 -> fragment = MicrogChangelogFragment()
2 -> fragment = ManagerChangelogFragment()
return when (position) {
0 -> VancedChangelogFragment()
1 -> MicrogChangelogFragment()
2 -> ManagerChangelogFragment()
else -> throw NotImplementedError()
}
return fragment!!
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,14 @@ import com.vanced.manager.ui.fragments.VancedChangelogFragment

class SectionPageRootAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {

private val fragmentItems = 2
override fun getItemCount(): Int {
return fragmentItems
}
override fun getItemCount(): Int = 2

override fun createFragment(position: Int): Fragment {
var fragment: Fragment? = null
when (position) {
0 -> fragment = VancedChangelogFragment()
1 -> fragment = ManagerChangelogFragment()
return when (position) {
0 -> VancedChangelogFragment()
1 -> ManagerChangelogFragment()
else -> throw NotImplementedError()
}
return fragment!!
}

}
18 changes: 16 additions & 2 deletions app/src/main/java/com/vanced/manager/core/App.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
package com.vanced.manager.core

import android.app.Application
import com.crowdin.platform.Crowdin
import com.crowdin.platform.CrowdinConfig
import com.crowdin.platform.data.remote.NetworkType
import com.downloader.PRDownloader
import com.vanced.manager.utils.NotificationHelper.createNotifChannel

class App: Application() {

override fun onCreate() {
super.onCreate()
PRDownloader.initialize(this)
createNotifChannel(this)

Crowdin.init(this,
CrowdinConfig.Builder()
.withDistributionHash("36c51aed3180a4f43073d28j4s6")
.withNetworkType(NetworkType.WIFI)
.build())
}

/*
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
Crowdin.onConfigurationChanged()
}
*/

}
61 changes: 0 additions & 61 deletions app/src/main/java/com/vanced/manager/core/Main.kt

This file was deleted.

Loading

0 comments on commit 3126260

Please sign in to comment.