forked from Automattic/pocket-casts-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (80 loc) · 2.81 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
88
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
kotlin_version = '1.7.10'
hilt_version = '2.43.2'
}
repositories {
google()
mavenLocal()
maven {
url 'https://a8c-libs.s3.amazonaws.com/android'
content {
includeGroup "com.automattic.android"
includeGroup "com.automattic.android.publish-to-s3"
}
}
}
// Gradle Plugins
dependencies {
// Android - https://developer.android.com/studio/releases/gradle-plugin
classpath 'com.android.tools.build:gradle:7.3.0'
// Google Services - https://developers.google.com/android/guides/google-services-plugin
classpath "com.google.gms:google-services:4.3.14"
// Kotlin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// Open source licenses plugin
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5'
// Hilt dependency injection
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
}
// Force proguard to the new version to fix "proguard.ParseException: Use of generics not allowed for java type at '<1>_<2>_<3>JsonAdapter' in line 31 of file '/Users/philip/.gradle/caches/transforms-2/files-2.1/d5ca2d039e1d32e9ba6bfd6a67df5151/META-INF/proguard/moshi.pro'"
configurations.all {
resolutionStrategy {
force 'net.sf.proguard:proguard-gradle:6.1.1'
}
}
}
plugins {
id 'com.mikepenz.aboutlibraries.plugin' version '10.4.0' apply false
id 'com.github.ben-manes.versions' version '0.42.0'
id 'com.diffplug.spotless' version '6.2.2'
id 'io.sentry.android.gradle' version '3.1.5' apply false
}
apply plugin: 'base'
apply from: rootProject.file('dependencies.gradle')
apply from: 'scripts/git-hooks/install.gradle'
apply plugin: 'com.diffplug.spotless'
spotless {
kotlin {
target '**/*.kt'
targetExclude("$buildDir/**/*.kt")
targetExclude('bin/**/*.kt')
ktlint('0.45.1')
}
}
dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://a8c-libs.s3.amazonaws.com/android"
content {
includeGroup "com.automattic"
includeGroup "com.automattic.tracks"
}
}
}
}