Skip to content

Commit c40e19c

Browse files
committed
add new vortex config
1 parent 2f7791a commit c40e19c

File tree

9 files changed

+28
-104
lines changed

9 files changed

+28
-104
lines changed

.idea/compiler.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AppDetails.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ext {
1111
navigationPlugin = "androidx.navigation.safeargs.kotlin"
1212
EasyLauncherPlugin = "com.akaita.android.easylauncher"
1313
RealmPlugin = "realm-android"
14+
VortexPlugin = "io.vortex.gradle.plugin.dependencies"
1415

1516
//Android Details
1617
compileSdkV = 29

app/build.gradle

+1-38
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ apply plugin: "${rootProject.ext.KotlinKaptPlugin}"
55
apply plugin: "${rootProject.ext.navigationPlugin}"
66
apply plugin: "${rootProject.ext.RealmPlugin}"
77
apply plugin: "${rootProject.ext.FirebasePlugin}"
8+
apply plugin: "${rootProject.ext.VortexPlugin}"
89

910
android {
1011

@@ -45,30 +46,13 @@ android {
4546
abortOnError false
4647
}
4748

48-
// signingConfigs {
49-
// release {
50-
// storeFile file('Key Path')
51-
// storePassword 'Key Password'
52-
// keyAlias = 'Key Name'
53-
// keyPassword 'Key Password'
54-
// }
55-
//
56-
// debug {
57-
// storeFile file('Key Path')
58-
// storePassword 'Key Password'
59-
// keyAlias = 'Key Name'
60-
// keyPassword 'Key Password'
61-
// }
62-
// }
63-
6449
buildTypes {
6550

6651
debug {
6752
minifyEnabled false
6853
debuggable true
6954
ext.enableCrashlytics = false
7055
ext.alwaysUpdateBuildId = false
71-
// signingConfig signingConfigs.debug
7256
buildConfigField "String", "BASE_URL", "\"${ApiUrl}\""
7357
buildConfigField "String", "GithubClientID", "\"${GithubClientID}\""
7458
buildConfigField "String", "GithubSecreteID", "\"${GithubSecreteID}\""
@@ -80,7 +64,6 @@ android {
8064
debuggable false
8165
ext.alwaysUpdateBuildId = false
8266
ext.enableCrashlytics = true
83-
// signingConfig signingConfigs.release
8467
buildConfigField "String", "GithubClientID", "\"${GithubClientID}\""
8568
buildConfigField "String", "GithubSecreteID", "\"${GithubSecreteID}\""
8669
proguardFiles getDefaultProguardFile("${rootProject.ext.ProguardFile}"), "${rootProject.ext.Proguard}"
@@ -92,10 +75,6 @@ android {
9275
main.java.srcDirs += "${rootProject.ext.KotlinSource}"
9376
}
9477

95-
// easylauncher {
96-
// foregroundIconNames "${rootProject.ext.EasyLauncherForground}"
97-
// }
98-
9978
lintOptions {
10079
checkReleaseBuilds false
10180
}
@@ -147,7 +126,6 @@ dependencies { configuration ->
147126
userInterfaceConfiguration(configuration)
148127
retrofitConfiguration(configuration)
149128
applicationConfiguration(configuration)
150-
vortexConfiguration(configuration)
151129
daggerConfig(configuration)
152130
databaseConfiguration(configuration)
153131
implementation project(":data")
@@ -163,10 +141,6 @@ dependencies { configuration ->
163141
implementation 'com.squareup.leakcanary:leakcanary-object-watcher-android:2.1'
164142
implementation "androidx.navigation:navigation-fragment-ktx:2.2.1"
165143
implementation "androidx.navigation:navigation-ui-ktx:2.2.1"
166-
implementation "androidx.work:work-runtime-ktx:2.3.2"
167-
implementation "androidx.work:work-rxjava2:2.3.2"
168-
implementation "androidx.work:work-gcm:2.3.2"
169-
androidTestImplementation "androidx.work:work-testing:2.3.2"
170144
implementation 'androidx.fragment:fragment-ktx:1.2.2'
171145
implementation 'com.afollestad.material-dialogs:core:3.3.0'
172146

@@ -231,14 +205,3 @@ private void applicationConfiguration(configuration) {
231205
configuration.implementation ApplicationConfiguration.MultiDexApp
232206
configuration.implementation ApplicationConfiguration.KotlinJdk
233207
}
234-
235-
private void vortexConfiguration(configuration) {
236-
def VortexConfiguration = rootProject.ext.VortexConfiguration
237-
configuration.implementation VortexConfiguration.VortexUserInterface
238-
configuration.implementation VortexConfiguration.VortexPermissions
239-
configuration.implementation VortexConfiguration.VortexCore
240-
configuration.implementation VortexConfiguration.VortexLocal
241-
configuration.implementation VortexConfiguration.VortexData
242-
configuration.implementation VortexConfiguration.VortexExtras
243-
configuration.implementation VortexConfiguration.VortexPrefs
244-
}

app/src/main/java/com/yazan98/autohub/AutohubApplication.kt

+5-7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import io.vortex.android.prefs.VortexPrefsConfig
1919
import io.vortex.android.ui.VortexMessageDelegation
2020
import io.vortex.android.utils.VortexApplication
2121
import io.vortex.android.utils.VortexConfiguration
22+
import io.vortex.android.utils.VortexScope
2223
import kotlinx.coroutines.Dispatchers
2324
import org.koin.core.logger.Level
2425
import kotlinx.coroutines.GlobalScope
@@ -53,17 +54,12 @@ class AutohubApplication : VortexApplication(), Thread.UncaughtExceptionHandler
5354
override fun onCreate() {
5455
super.onCreate()
5556

56-
GlobalScope.launch {
57+
VortexScope().launch {
5758
GithubStarter("").apply {
5859
this.startSaveFollowers()
5960
this.startSaveFollowings()
6061
}
61-
}
62-
63-
FirebaseApp.initializeApp(this)
64-
VortexPrefsConfig.prefs = getSharedPreferences(SHARED_PREFS_NAME, SHARED_PREFS_MODE)
6562

66-
GlobalScope.launch {
6763
configNotifications()
6864
VortexConfiguration
6965
.registerLeakCanaryConfiguration()
@@ -88,9 +84,11 @@ class AutohubApplication : VortexApplication(), Thread.UncaughtExceptionHandler
8884
handleDatabaseError(ex.message)
8985
}
9086

91-
// startGithubActions()
9287
}
9388

89+
FirebaseApp.initializeApp(this)
90+
VortexPrefsConfig.prefs = getSharedPreferences(SHARED_PREFS_NAME, SHARED_PREFS_MODE)
91+
9492
Fresco.initialize(
9593
applicationContext,
9694
ImagePipelineConfig.newBuilder(applicationContext)

build.gradle

+6-20
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ buildscript {
1010
"FirebasePluginV" : "4.3.1",
1111
"KtlintPluginV" : "2.1.1",
1212
"FabricPluginV" : "1.28.1",
13-
"NavigationPluginV" : "2.2.0-rc04"
13+
"NavigationPluginV" : "2.2.0-rc04",
14+
"VortexPluginV" : "1.0.0",
15+
"RealmPluginV" : "7.0.0-beta-SNAPSHOT"
1416
]
1517

1618
repositories {
@@ -33,7 +35,8 @@ buildscript {
3335
classpath "org.jmailen.gradle:kotlinter-gradle:${rootProject.ext.PluginsVersions.KtlintPluginV}"
3436
classpath "io.fabric.tools:gradle:${rootProject.ext.PluginsVersions.FabricPluginV}"
3537
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:${rootProject.ext.PluginsVersions.NavigationPluginV}"
36-
classpath "io.realm:realm-gradle-plugin:7.0.0-beta-SNAPSHOT"
38+
classpath "gradle.plugin.io.vortex.gradle.plugin.dependencies:vortex-dependencies-plugin:${rootProject.ext.PluginsVersions.VortexPluginV}"
39+
classpath "io.realm:realm-gradle-plugin:${rootProject.ext.PluginsVersions.RealmPluginV}"
3740
}
3841

3942
}
@@ -64,25 +67,10 @@ subprojects {
6467
apply plugin: "${rootProject.ext.KotlinAndroidExPlugin}"
6568
apply plugin: "${rootProject.ext.KotlinKaptPlugin}"
6669
apply plugin: "${rootProject.ext.RealmPlugin}"
70+
apply plugin: "${rootProject.ext.VortexPlugin}"
6771

6872
android {
6973

70-
// signingConfigs {
71-
// release {
72-
// storeFile file('Key Path')
73-
// storePassword 'Key Password'
74-
// keyAlias = 'Key Name'
75-
// keyPassword 'Key Password'
76-
// }
77-
//
78-
// debug {
79-
// storeFile file('Key Path')
80-
// storePassword 'Key Password'
81-
// keyAlias = 'Key Name'
82-
// keyPassword 'Key Password'
83-
// }
84-
// }
85-
8674
compileSdkVersion rootProject.ext.compileSdkV
8775
buildToolsVersion "${rootProject.ext.BuildToolsVersion}"
8876
defaultConfig {
@@ -107,7 +95,6 @@ subprojects {
10795
manifestPlaceholders = [enableCrashReporting: "false"]
10896
ext.enableCrashlytics = false
10997
ext.alwaysUpdateBuildId = false
110-
// signingConfig signingConfigs.debug
11198
proguardFiles getDefaultProguardFile("${rootProject.ext.ProguardFile}"), "${rootProject.ext.Proguard}"
11299
}
113100

@@ -117,7 +104,6 @@ subprojects {
117104
ext.enableCrashlytics = true
118105
manifestPlaceholders = [enableCrashReporting: "true"]
119106
proguardFiles getDefaultProguardFile("${rootProject.ext.ProguardFile}"), "${rootProject.ext.Proguard}"
120-
// signingConfig signingConfigs.release
121107
}
122108

123109
}

data/build.gradle

+1-29
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
1-
/**
2-
* Room Database Schema Location
3-
*/
4-
android {
5-
defaultConfig {
6-
javaCompileOptions {
7-
annotationProcessorOptions {
8-
arguments = [
9-
"room.schemaLocation":"$projectDir/schemas".toString(),
10-
"room.incremental":"true",
11-
"room.expandProjection":"true"]
12-
}
13-
}
14-
}
15-
}
1+
apply plugin: "${rootProject.ext.VortexPlugin}"
162

173
dependencies { configuration ->
184
implementation fileTree(dir: 'libs', include: ['*.jar'])
195
rxJavaConfiguration(configuration)
206
retrofitConfiguration(configuration)
21-
vortexConfiguration(configuration)
227
lifeCycleConfiguration(configuration)
238
databaseConfiguration(configuration)
24-
25-
def work_version = "2.3.0"
26-
implementation "androidx.work:work-runtime-ktx:$work_version"
27-
implementation "androidx.work:work-rxjava2:$work_version"
28-
implementation "androidx.work:work-gcm:$work_version"
29-
androidTestImplementation "androidx.work:work-testing:$work_version"
309
}
3110

3211
private void rxJavaConfiguration(configuration) {
@@ -42,10 +21,3 @@ private void retrofitConfiguration(configuration) {
4221
configuration.implementation DataConfiguration.RetrofitIntercenptor
4322
configuration.implementation DataConfiguration.retrofitGsonConverter
4423
}
45-
46-
private void vortexConfiguration(configuration) {
47-
def VortexConfiguration = rootProject.ext.VortexConfiguration
48-
configuration.implementation VortexConfiguration.VortexCore
49-
configuration.implementation VortexConfiguration.VortexData
50-
configuration.implementation VortexConfiguration.VortexPrefs
51-
}

domain/build.gradle

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
1+
apply plugin: "${rootProject.ext.VortexPlugin}"
2+
13
dependencies { configuration ->
24
implementation project(":data")
35
lifeCycleConfiguration(configuration)
4-
vortexConfiguration(configuration)
56
koinConfiguration(configuration)
67
databaseConfiguration(configuration)
78
}
89

9-
private void vortexConfiguration(configuration) {
10-
def VortexConfiguration = rootProject.ext.VortexConfiguration
11-
configuration.implementation VortexConfiguration.VortexCore
12-
configuration.implementation VortexConfiguration.VortexLocal
13-
configuration.implementation VortexConfiguration.VortexData
14-
configuration.implementation VortexConfiguration.VortexPrefs
15-
}
16-
1710
private void koinConfiguration(configuration) {
1811
def KoinConfiguration = rootProject.ext.KoinConfiguration
1912
configuration.implementation KoinConfiguration.KoinAndroid

0 commit comments

Comments
 (0)