-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
87 lines (73 loc) · 3.54 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.PluginsVersions = [
"FirebasePluginV" : "4.3.1",
"NavigationPluginV" : "2.5.0",
"HiltPluginVersion" : "2.28-alpha",
"NexusPublishPluginVersoin": "1.1.0"
]
repositories {
google()
mavenCentral()
maven { url "https://details.gradle.org/m2/" }
maven { url 'https://jitpack.io' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
}
dependencies {
classpath "com.google.gms:google-services:${rootProject.ext.PluginsVersions.FirebasePluginV}"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:${rootProject.ext.PluginsVersions.NavigationPluginV}"
classpath "io.github.gradle-nexus:publish-plugin:${rootProject.ext.PluginsVersions.NexusPublishPluginVersoin}"
}
}
plugins {
id 'com.android.application' version '8.1.0-alpha03' apply false
id 'com.android.library' version '8.1.0-alpha03' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
id 'org.jetbrains.kotlin.jvm' version '1.7.20'
id 'com.google.dagger.hilt.android' version '2.44' apply false
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
}
apply from: "details.gradle"
apply plugin: "io.github.gradle-nexus.publish-plugin"
apply from: "${rootDir}/scripts/publish-root.gradle"
ext {
PUBLISH_GROUP_ID = 'com.yazantarifi'
PUBLISH_VERSION = '2.0.0'
PUBLISH_DESCRIPTION = 'Application Structure, Base Code, Configuration, Utility Classes to Build Android Applications'
PUBLISH_URL = 'https://github.com/Yazan98/Vanite'
PUBLISH_LICENSE_NAME = 'MIT'
PUBLISH_LICENSE_URL = 'https://github.com/Yazan98/Vanite/blob/main/LICENSE'
PUBLISH_DEVELOPER_ID = 'yt98'
PUBLISH_DEVELOPER_NAME = 'Yazan Tarifi'
PUBLISH_DEVELOPER_EMAIL = '[email protected]'
PUBLISH_SCM_CONNECTION = 'scm:git:github.com/Yazan98/Vanite.git'
PUBLISH_SCM_DEVELOPER_CONNECTION = 'scm:git:ssh://github.com/Yazan98/Vanite.git'
PUBLISH_SCM_URL = 'https://github.com/Yazan98/Vanite/tree/master'
}
subprojects {
group = PUBLISH_GROUP_ID
version = PUBLISH_VERSION
}
public void addDefaultAppCompatDependencies(configuration) {
configuration.implementation("androidx.appcompat:appcompat:${rootProject.ext.AppCompatV}")
configuration.implementation("androidx.core:core-ktx:${rootProject.ext.AndroidCoreV}")
configuration.testImplementation("junit:junit:${rootProject.ext.JUnitV}")
configuration.androidTestImplementation("androidx.test.ext:junit:${rootProject.ext.TestJunitV}")
configuration.androidTestImplementation("androidx.test.espresso:espresso-core:${rootProject.ext.EspressoV}")
}
public void addCoroutinesLibraries(configuration) {
configuration.implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:${rootProject.ext.CoroutinesCoreV}")
configuration.implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:${rootProject.ext.CoroutinesAndroidV}")
}
public void addRxJavaLibraries(configuration) {
configuration.implementation("io.reactivex.rxjava2:rxjava:${rootProject.ext.RxJavaV}")
configuration.implementation("io.reactivex.rxjava2:rxandroid:${rootProject.ext.RxAndroidV}")
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xmaxerrs" << "500"
}
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile.class).configureEach {
it.kotlinOptions.jvmTarget = "10"
}