-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
161 lines (129 loc) · 5 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// Top-level build file where you can add configuration options common to all sub-projects/modules
buildscript {
ext {
// ----- SDK Compile and Build Versions ----- //
// Minimum compileSDK version requirements
// https://support.google.com/googleplay/android-developer/answer/11926878?hl=en
compileSdkVersion = 34
minSdkVersion = 21
targetSdkVersion = 34
// ----- App dependencies ----- //
// AndroidX
// https://developer.android.com/jetpack/androidx/explorer
core_ktx_version = '1.7.0'
activity_ktx_version = '1.4.0'
fragment_ktx_version = '1.4.1'
livedata_ktx_version = '2.4.1'
appcompat_library_version = '1.4.1'
annotations_version = '1.3.0'
lifecycle_version = '2.4.1'
constraint_layout_version = '2.1.3'
exifinterface = '1.3.3'
// Material Design
// https://github.com/material-components/material-components-android/releases
material_design_version = '1.5.0'
// Google Play (For Google In-App Review)
// https://developer.android.com/guide/playcore
// https://developers.google.com/android/guides/setup
play_review_version = '2.0.1'
play_services_base_version = '18.2.0'
// Gson
// https://github.com/google/gson
gson_version = '2.10.1'
// ----- Testing ----- //
// AndroidX
// https://developer.android.com/training/testing/set-up-project
androidx_junit_ext_version = '1.1.5'
androidx_test_version = '1.5.0'
androidx_arch_core_version = '2.1.0'
// Espresso
// https://developer.android.com/training/testing/espresso
espresso_core_version = '3.5.0'
// Json
// https://mvnrepository.com/artifact/org.json/json
json_version = '20210307'
// Truth
// https://truth.dev/
// https://github.com/google/truth
truth_version = '1.1.3'
// Mockk
// https://mockk.io/
mockk_version = '1.13.5'
}
project.ext {
sonatypeVersion = '6.9.1'
jfrogVersion = '6.8.1'
// Change this depending on where you are publishing to
repoVersion = sonatypeVersion
}
repositories {
mavenCentral()
google()
}
allprojects {
repositories {
google()
mavenCentral()
maven {
def artifactoryProperties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
artifactoryProperties.load(project.rootProject.file('local.properties').newDataInputStream())
}
url "https://apptentive.jfrog.io/artifactory/InternalNewAndroidSDK"
credentials {
username = artifactoryProperties['artifactory_username'] ? artifactoryProperties['artifactory_username'] : ""
password = artifactoryProperties['artifactory_password'] ? artifactoryProperties['artifactory_password'] : ""
}
}
}
}
dependencies {
// Android Gradle
// https://developer.android.com/studio/releases/gradle-plugin
classpath 'com.android.tools.build:gradle:8.1.1'
// Kotlin Gradle
// https://kotlinlang.org/docs/gradle.html
// https://kotlinlang.org/docs/releases.html#release-details
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
// JFrog Gradle
// https://plugins.gradle.org/plugin/com.jfrog.artifactory
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.24.20"
}
}
plugins {
// gradle-github-plugin
// https://github.com/riiid/gradle-github-plugin
id "co.riiid.gradle" version "0.4.2"
// ktlint Gradle
// https://github.com/JLLeitschuh/ktlint-gradle
id "org.jlleitschuh.gradle.ktlint" version "10.2.1"
// Gradle Nexus Publish Plugin
// https://github.com/gradle-nexus/publish-plugin
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
// Gradle Dokka Plugin
// https://github.com/Kotlin/dokka
id "org.jetbrains.dokka" version "1.6.0"
}
nexusPublishing {
repositories {
sonatype {
Properties sonatypeProperties = new Properties()
if (project.rootProject.file('local.properties').exists()) {
sonatypeProperties.load(project.rootProject.file('local.properties').newDataInputStream())
}
username = sonatypeProperties.getProperty('sonatypeUsername') ? sonatypeProperties['sonatypeUsername'] : ""
password = sonatypeProperties.getProperty('sonatypePassword') ? sonatypeProperties['sonatypePassword'] : ""
}
}
}
group = "com.apptentive"
version = sonatypeVersion
allprojects {
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply from: "jfrog-publish-util.gradle"
apply from: "sonatype-publish-util.gradle"