-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathbuild.gradle
More file actions
97 lines (83 loc) · 3 KB
/
build.gradle
File metadata and controls
97 lines (83 loc) · 3 KB
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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.hilt_version = '2.57.2'
ext.room_version = '2.7.1'
ext.useCrashlytics = file("networksurvey/google-services.json").exists()
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:9.0.1'
if (useCrashlytics) {
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
}
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:2.3.5"
}
}
plugins {
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
//alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.kotlin.parcelize) apply false
//alias(libs.plugins.google.devtools.ksp) apply false
}
allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
maven { url = 'https://jitpack.io' }
}
}
tasks.register('clean', Delete) {
delete rootProject.layout.buildDirectory
}
tasks.register("downloadBluetoothCompanyIdentifiers") {
group = "network-survey"
description = "Downloads the Bluetooth SIG company_identifiers.yaml file"
doLast {
def targetDir = file("networksurvey/src/main/assets")
if (!targetDir.exists()) {
targetDir.mkdirs()
}
def fileUrl = "https://bitbucket.org/bluetooth-SIG/public/raw/main/assigned_numbers/company_identifiers/company_identifiers.yaml\n"
def outputFile = new File(targetDir, "company_identifiers.yaml")
println "Downloading file from $fileUrl..."
new URL(fileUrl).withInputStream { input ->
outputFile.withOutputStream { out ->
out << input
}
}
println "Saved to ${outputFile.absolutePath}"
}
}
tasks.register("downloadBluetoothMemberUuids") {
group = "network-survey"
description = "Downloads the Bluetooth SIG member_uuids.yaml file"
doLast {
def targetDir = file("networksurvey/src/main/assets")
if (!targetDir.exists()) {
targetDir.mkdirs()
}
def fileUrl = "https://bitbucket.org/bluetooth-SIG/public/raw/main/assigned_numbers/uuids/member_uuids.yaml"
def outputFile = new File(targetDir, "member_uuids.yaml")
println "Downloading file from $fileUrl..."
new URL(fileUrl).withInputStream { input ->
outputFile.withOutputStream { out ->
out << input
}
}
println "Saved to ${outputFile.absolutePath}"
}
}
// Only run before release builds
afterEvaluate {
if (tasks.findByName("preReleaseBuild")) {
tasks.named("preReleaseBuild") {
dependsOn("downloadBluetoothCompanyIdentifiers", "downloadBluetoothMemberUuids")
}
}
}