This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(school): create module schoolData with git submodule
- Loading branch information
1 parent
8d2d672
commit 39f6c31
Showing
8 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
import com.google.protobuf.gradle.id | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
import org.jetbrains.kotlin.config.KotlinCompilerVersion.VERSION as KOTLIN_VERSION | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("org.jetbrains.kotlin.kapt") | ||
alias(libs.plugins.protobuf.plugin) | ||
} | ||
|
||
android { | ||
namespace = "com.intelligentbackpack.schooldata" | ||
compileSdk = 33 | ||
|
||
defaultConfig { | ||
minSdk = 29 | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles("consumer-rules.pro") | ||
testInstrumentationRunnerArguments["clearPackageData"] = "true" | ||
|
||
javaCompileOptions { | ||
annotationProcessorOptions { | ||
arguments += mapOf( | ||
"room.schemaLocation" to "$projectDir/schemas", | ||
"room.incremental" to "true", | ||
) | ||
} | ||
} | ||
} | ||
|
||
testOptions { | ||
execution = "ANDROIDX_TEST_ORCHESTRATOR" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro", | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
|
||
packaging { | ||
resources { | ||
merges += "META-INF/INDEX.LIST" | ||
} | ||
} | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(17) | ||
} | ||
|
||
dependencies { | ||
implementation(libs.core.ktx) | ||
implementation(libs.bundles.retrofit) | ||
implementation(libs.bundles.protobuf) | ||
implementation(libs.bundles.grpc) | ||
implementation(libs.bundles.room) | ||
kapt(libs.androidx.room.compiler) | ||
implementation(platform("com.google.firebase:firebase-bom:32.1.0")) | ||
implementation("com.google.firebase:firebase-database-ktx") | ||
implementation(project(":networkUtility")) | ||
implementation(project(":reminderDomain")) | ||
implementation(project(":accessDomain")) | ||
testImplementation(gradleTestKit()) | ||
testImplementation(libs.bundles.kotlin.testing) | ||
androidTestImplementation(libs.bundles.androidTest) | ||
androidTestImplementation(libs.mockito.android) | ||
androidTestUtil(libs.orchestrator) | ||
} | ||
|
||
configurations.all { | ||
resolutionStrategy.eachDependency { | ||
if (requested.group == "org.jetbrains.kotlin" && requested.name.startsWith("kotlin")) { | ||
useVersion(KOTLIN_VERSION) | ||
because("All Kotlin modules should use the same version, and compiler uses $KOTLIN_VERSION") | ||
} | ||
} | ||
} | ||
|
||
tasks { | ||
withType<Test> { | ||
useJUnitPlatform() | ||
testLogging { | ||
showCauses = true | ||
showStackTraces = true | ||
showStandardStreams = true | ||
events(*TestLogEvent.values()) | ||
} | ||
} | ||
withType<KotlinCompile> { | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
allWarningsAsErrors = true | ||
freeCompilerArgs += listOf("-opt-in=kotlin.RequiresOptIn", "-Xinline-classes") | ||
} | ||
} | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
// The artifact spec for the Protobuf Compiler | ||
artifact = "com.google.protobuf:protoc:${libs.versions.protobuf.compiler.get()}" | ||
} | ||
plugins { | ||
// Optional: an artifact spec for a protoc plugin, with "grpc" as | ||
// the identifier, which can be referred to in the "plugins" | ||
// container of the "generateProtoTasks" closure. | ||
id("grpc") { | ||
artifact = "io.grpc:protoc-gen-grpc-java:${libs.versions.grpc.protobuf.get()}" | ||
} | ||
} | ||
|
||
generateProtoTasks { | ||
all().forEach() { | ||
// The "plugins" container is a NamedDomainObjectContainer<GenerateProtoTask.PluginOptions> | ||
// which can be used to configure the plugins applied to the task. | ||
it.builtins { | ||
id("kotlin") { | ||
} | ||
id("java") { | ||
} | ||
} | ||
} | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters