diff --git a/build.gradle b/build.gradle deleted file mode 100644 index f523b842b..000000000 --- a/build.gradle +++ /dev/null @@ -1,91 +0,0 @@ -apply from: 'dependencies.gradle' -apply plugin: "com.github.ben-manes.versions" - -buildscript { - ext { - kotlinVersion = '1.5.21' - - versions = [:] - libraries = [:] - constants = [ - minSdk : 21, - targetSdk : 30, - compileSdk : 30 - ] - } - - repositories { - google() - mavenCentral() - maven { url 'https://jitpack.io' } - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" - classpath "com.vanniktech:gradle-android-junit-jacoco-plugin:0.16.0" - classpath "com.github.ben-manes:gradle-versions-plugin:0.38.0" - classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.4.32" - classpath "org.jetbrains.dokka:android-documentation-plugin:1.4.32" - classpath "com.vanniktech:gradle-maven-publish-plugin:0.14.2" - } -} - -apply plugin: "org.jetbrains.dokka" - -allprojects { - repositories { - google() - mavenCentral() - } - - tasks.withType(org.jetbrains.dokka.gradle.DokkaTaskPartial).configureEach { - dokkaSourceSets.named("main") { - configuration { - jdkVersion.set(8) - skipDeprecated.set(true) - skipEmptyPackages.set(true) - reportUndocumented.set(false) - } - } - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} - -apply plugin: "com.vanniktech.android.junit.jacoco" -junitJacoco { - // WARNING! Don't upgrade unless https://github.com/Malinskiy/danger-jacoco/issues/10 is fixed - jacocoVersion = '0.8.2' - excludes = [ - // Defaults - '**/androidx/**/*.*', - '**/*$$*', - '**/BuildConfig.*', - '**/Manifest*.*', - '**/*$Lambda$*.*', // Jacoco can not handle several "$" in class name. - '**/*$inlined$*.*', // Kotlin specific, Jacoco can not handle several "$" in class name. - '**/com/instacart/formula/test/**/*.*' - ] - ignoreProjects = [ - "samples/*" - ] - includeNoLocationClasses = true - includeInstrumentationCoverageInMergedReport = true -} - -apply from: 'gradle/merge-reports.gradle' - -tasks.register("install") { - def publishTasks = [] - project.subprojects.forEach { project -> - def installTask = project.tasks.findByName("install") ?: project.tasks.findByName("publishToMavenLocal") - if (installTask != null) { - publishTasks.add(installTask) - } - } - dependsOn publishTasks -} - diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..aaa8d002b --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,55 @@ +buildscript { + + repositories { + google() + mavenCentral() + maven(url = "https://jitpack.io") + } + + dependencies { + classpath(libs.android.gradle) + classpath(libs.kotlin.gradle) + classpath(libs.jacoco.gradle) + classpath(libs.version.gradle) + classpath(libs.dokka.gradle) + classpath(libs.dokka.android.gradle) + classpath(libs.maven.publish.gradle) + } +} + +apply(plugin = "com.github.ben-manes.versions") +apply(plugin = "org.jetbrains.dokka") +apply(from = "gradle/jacoco.gradle") +apply(from = "gradle/merge-reports.gradle") + +allprojects { + repositories { + google() + mavenCentral() + } + + tasks.withType().configureEach { + dokkaSourceSets.named("main") { + jdkVersion.set(8) + skipDeprecated.set(true) + skipEmptyPackages.set(true) + reportUndocumented.set(false) + } + } +} + +tasks.register("clean", Delete::class) { + delete(rootProject.buildDir) +} + +tasks.register("install") { + val publishTasks = mutableListOf() + project.subprojects.forEach { project -> + val installTask = project.tasks.findByName("install") ?: project.tasks.findByName("publishToMavenLocal") + if (installTask != null) { + publishTasks.add(installTask) + } + } + dependsOn(publishTasks) +} + diff --git a/dependencies.gradle b/dependencies.gradle deleted file mode 100644 index 8e3513438..000000000 --- a/dependencies.gradle +++ /dev/null @@ -1,90 +0,0 @@ -ext { - androidXVersion = '1.2.0' - androidTestVersion = "1.4.0" - androidJUnitVersion = "1.1.0" - lifecycleVersion = '2.2.0' - lifecycleKtxVersion = '2.4.0-alpha03' - - espressoVersion = "3.4.0" - junitVersion = "4.13.2" - mockitoVersion = "3.12.4" - mockitoKotlinVersion = "1.6.0" - okhttpVersion = "3.13.1" - robolectricVersion = "4.6.1" - truthVersion = "1.1.3" - composeVersion = "1.0.1" - kotlinCoroutinesVersion = "1.5.2" - lintVersion = "30.0.0" - autoServiceVersion = "1.0-rc7" - - libraries = [ - androidx : [ - annotation : "androidx.annotation:annotation:$androidXVersion", - appcompat : "androidx.appcompat:appcompat:1.3.1", - browser : "androidx.browser:browser:$androidXVersion", - core : [ - ktx: "androidx.core:core-ktx:1.6.0" - ], - activity : [ - compose : "androidx.activity:activity-compose:1.3.1", - ktx : "androidx.activity:activity-ktx:1.3.1" - ], - compose : [ - foundation : "androidx.compose.foundation:foundation:$composeVersion", - material : "androidx.compose.material:material:$composeVersion", - rxjava3 : "androidx.compose.runtime:runtime-rxjava3:$composeVersion", - ui : "androidx.compose.ui:ui:$composeVersion", - uiTooling : "androidx.compose.ui:ui-tooling:$composeVersion", - - ], - collection : [ - ktx: "androidx.collection:collection-ktx:$androidXVersion" - ], - constraintlayout: "androidx.constraintlayout:constraintlayout:2.1.0", - lifecycle : [ - runtime : "androidx.lifecycle:lifecycle-runtime:$lifecycleVersion", - extensions: "androidx.lifecycle:lifecycle-extensions:$lifecycleVersion", - runtimektx : "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleKtxVersion", - extensionsktx: "androidx.lifecycle:lifecycle-extensions-ktx:$lifecycleKtxVersion", - ], - recyclerview : "androidx.recyclerview:recyclerview:$androidXVersion", - fragment : [ - ktx: "androidx.fragment:fragment-ktx:1.2.1" - ], - test : [ - core : "androidx.test:core:$androidTestVersion", - espresso: [ - core : "androidx.test.espresso:espresso-core:$espressoVersion", - contrib: "androidx.test.espresso:espresso-contrib:$espressoVersion", - intents: "androidx.test.espresso:espresso-intents:$espressoVersion" - ], - ext : [ - junit: "androidx.test.ext:junit:$androidJUnitVersion" - ], - rules : "androidx.test:rules:$androidTestVersion", - runner : "androidx.test:runner:$androidTestVersion" - ] - ], - auto: [ - service: "com.google.auto.service:auto-service:${autoServiceVersion}", - serviceAnnotations: "com.google.auto.service:auto-service-annotations:${autoServiceVersion}", - ], - junit : "junit:junit:$junitVersion", - kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion", - coroutines : "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion", - kotlinReflect : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion", - lint: [ - core: "com.android.tools.lint:lint:${lintVersion}", - api: "com.android.tools.lint:lint-api:${lintVersion}", - checks: "com.android.tools.lint:lint-checks:${lintVersion}", - tests: "com.android.tools.lint:lint-tests:${lintVersion}", - ], - robolectric : "org.robolectric:robolectric:$robolectricVersion", - rxjava : "io.reactivex.rxjava3:rxjava:3.1.1", - rxandroid : "io.reactivex.rxjava3:rxandroid:3.0.0", - rxrelays : "com.jakewharton.rxrelay3:rxrelay:3.0.1", - truth : "com.google.truth:truth:$truthVersion", - coroutinesTest : "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinCoroutinesVersion" - - ] -} diff --git a/formula-android-compose/build.gradle b/formula-android-compose/build.gradle deleted file mode 100644 index b6d41b71c..000000000 --- a/formula-android-compose/build.gradle +++ /dev/null @@ -1,77 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' - -apply from: rootProject.file('.buildscript/configure-signing.gradle') -apply from: rootProject.file('.buildscript/jacoco-workaround.gradle') - -android { - compileSdkVersion constants.compileSdk - - defaultConfig { - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - } - - buildFeatures { - compose true - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = "1.8" - useIR = true - } - - composeOptions { - kotlinCompilerVersion constants.kotlinVersion - kotlinCompilerExtensionVersion composeVersion - } - -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - setArchiveClassifier('sources') -} - -task javadoc(type: Javadoc) { - failOnError false - source = android.sourceSets.main.java.sourceFiles - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - classpath += configurations.api - classpath += configurations.implementation -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - setArchiveClassifier('javadoc') - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar -} - -dependencies { - api project(":formula-android") - api libraries.androidx.compose.ui - - implementation libraries.androidx.compose.rxjava3 - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - - testImplementation libraries.truth - testImplementation libraries.kotlinReflect -} diff --git a/formula-android-compose/build.gradle.kts b/formula-android-compose/build.gradle.kts new file mode 100644 index 000000000..07be38cd2 --- /dev/null +++ b/formula-android-compose/build.gradle.kts @@ -0,0 +1,75 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +apply { + from("$rootDir/.buildscript/configure-signing.gradle") + from("$rootDir/.buildscript/jacoco-workaround.gradle") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + } + + buildFeatures { + compose = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + composeOptions { + kotlinCompilerVersion = libs.versions.kotlin.get() + kotlinCompilerExtensionVersion = libs.versions.compose.get() + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +task("sourcesJar") { + from(android.sourceSets["main"].java.srcDirs) + archiveClassifier.set("sources") +} + +task("javadoc") { + isFailOnError = false + source(android.sourceSets["main"].java.getSourceFiles()) + classpath += project.files(android.bootClasspath.joinToString(separator = File.pathSeparator)) + classpath += configurations.api + classpath += configurations.implementation +} + +task("javadocJar") { + dependsOn("javadoc") + archiveClassifier.set("javadoc") + from(tasks["javadoc"].path) +} + +artifacts { + archives(tasks["sourcesJar"]) + archives(tasks["javadocJar"]) +} + +dependencies { + api(project(":formula-android")) + api(libs.compose.ui) + + implementation(libs.compose.rxjava3) + + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.truth) + testImplementation(libs.kotlin.reflect) +} diff --git a/formula-android-tests/build.gradle b/formula-android-tests/build.gradle deleted file mode 100644 index f7219c590..000000000 --- a/formula-android-tests/build.gradle +++ /dev/null @@ -1,58 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -apply from: rootProject.file('.buildscript/jacoco-workaround.gradle') - -android { - compileSdkVersion 28 - defaultConfig { - applicationId "com.instacart.formula.samples" - minSdkVersion constants.minSdk - targetSdkVersion 28 // Using sdk 28 for robolectric tests. - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-rxjava3") - implementation project(":formula-android") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.androidx.lifecycle.extensions - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.ext.junit - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric -} diff --git a/formula-android-tests/build.gradle.kts b/formula-android-tests/build.gradle.kts new file mode 100644 index 000000000..455f0f35d --- /dev/null +++ b/formula-android-tests/build.gradle.kts @@ -0,0 +1,63 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +apply { + from("$rootDir/.buildscript/jacoco-workaround.gradle") +} + +android { + compileSdk = 28 + defaultConfig { + applicationId = "com.instacart.formula.samples" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = 28 // Using sdk 28 for robolectric tests. + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + implementation(project(":formula-android")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.lifecycle.extensions) + implementation(libs.androidx.test.core.ktx) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.junit) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) +} diff --git a/formula-android/build.gradle b/formula-android/build.gradle deleted file mode 100644 index d5f886bf7..000000000 --- a/formula-android/build.gradle +++ /dev/null @@ -1,75 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-kapt' -apply plugin: "kotlin-parcelize" - -apply from: rootProject.file('.buildscript/configure-signing.gradle') -apply from: rootProject.file('.buildscript/jacoco-workaround.gradle') - -android { - compileSdkVersion constants.compileSdk - - defaultConfig { - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - testOptions { - unitTests { - returnDefaultValues true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - setArchiveClassifier('sources') -} - -task javadoc(type: Javadoc) { - failOnError false - source = android.sourceSets.main.java.sourceFiles - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - classpath += configurations.api - classpath += configurations.implementation -} - -task javadocJar(type: Jar, dependsOn: javadoc) { - setArchiveClassifier('javadoc') - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar -} - -dependencies { - implementation project(':formula-rxjava3') - - implementation libraries.androidx.annotation - implementation libraries.androidx.appcompat - - api libraries.rxandroid - api libraries.rxrelays - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - - testImplementation libraries.truth - testImplementation "org.mockito:mockito-inline:$mockitoVersion" - testImplementation "com.nhaarman:mockito-kotlin:$mockitoKotlinVersion" - testImplementation libraries.kotlinReflect -} diff --git a/formula-android/build.gradle.kts b/formula-android/build.gradle.kts new file mode 100644 index 000000000..eb1144ea9 --- /dev/null +++ b/formula-android/build.gradle.kts @@ -0,0 +1,76 @@ +plugins { + id("com.android.library") + id("kotlin-android") + id("kotlin-kapt") + id("kotlin-parcelize") +} + +apply { + from("$rootDir/.buildscript/configure-signing.gradle") + from("$rootDir/.buildscript/jacoco-workaround.gradle") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + testOptions { + unitTests.isReturnDefaultValues = true + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +task("sourcesJar") { + from(android.sourceSets["main"].java.srcDirs) + archiveClassifier.set("sources") +} + +task("javadoc") { + isFailOnError = false + source(android.sourceSets["main"].java.getSourceFiles()) + classpath += project.files(android.bootClasspath.joinToString(separator = File.pathSeparator)) + classpath += configurations.api + classpath += configurations.implementation +} + +task("javadocJar") { + dependsOn("javadoc") + archiveClassifier.set("javadoc") + from(tasks["javadoc"].path) +} + +artifacts { + archives(tasks["sourcesJar"]) + archives(tasks["javadocJar"]) +} + +dependencies { + implementation(project(":formula-rxjava3")) + implementation(libs.androidx.annotation) + implementation(libs.androidx.appcompat) + + api(libs.rxandroid) + api(libs.rxrelay) + + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.truth) + testImplementation(libs.mockito.inline) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.kotlin.reflect) +} diff --git a/formula-coroutines/build.gradle b/formula-coroutines/build.gradle deleted file mode 100644 index dc504511b..000000000 --- a/formula-coroutines/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - id 'java-library' - id 'kotlin' -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -dependencies { - implementation libraries.kotlin - implementation libraries.coroutines - - api project(":formula") - - testImplementation project(":formula-test") - testImplementation libraries.truth - testImplementation libraries.junit - testImplementation libraries.coroutinesTest -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { - kotlinOptions { - freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" - } -} \ No newline at end of file diff --git a/formula-coroutines/build.gradle.kts b/formula-coroutines/build.gradle.kts new file mode 100644 index 000000000..36240d14e --- /dev/null +++ b/formula-coroutines/build.gradle.kts @@ -0,0 +1,27 @@ +plugins { + id("java-library") + id("kotlin") +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +dependencies { + implementation(libs.kotlin) + implementation(libs.coroutines) + + api(project(":formula")) + + testImplementation(project(":formula-test")) + testImplementation(libs.truth) + testImplementation(libs.junit) + testImplementation(libs.coroutines.test) +} + +tasks.withType().all { + kotlinOptions { + freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn" + } +} \ No newline at end of file diff --git a/formula-lint/build.gradle b/formula-lint/build.gradle deleted file mode 100644 index 90e545791..000000000 --- a/formula-lint/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -apply plugin: 'java-library' -apply plugin: 'kotlin' -apply plugin: 'org.jetbrains.kotlin.kapt' -apply plugin: 'com.android.lint' -apply plugin: 'org.jetbrains.dokka' - -apply from: rootProject.file('.buildscript/configure-signing.gradle') - -targetCompatibility = JavaVersion.VERSION_1_8 -sourceCompatibility = JavaVersion.VERSION_1_8 - -dependencies { - compileOnly libraries.lint.api - compileOnly libraries.lint.checks - compileOnly libraries.auto.serviceAnnotations - kapt libraries.auto.service - testImplementation libraries.junit - testImplementation libraries.lint.core - testImplementation libraries.lint.tests - testImplementation libraries.junit -} diff --git a/formula-lint/build.gradle.kts b/formula-lint/build.gradle.kts new file mode 100644 index 000000000..4658ff7a2 --- /dev/null +++ b/formula-lint/build.gradle.kts @@ -0,0 +1,26 @@ +plugins { + id("java-library") + id("kotlin") + id("org.jetbrains.kotlin.kapt") + id("com.android.lint") + id("org.jetbrains.dokka") +} + +apply { + from("$rootDir/.buildscript/configure-signing.gradle") +} + +java { + targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 +} + +dependencies { + compileOnly(libs.lint.api) + compileOnly(libs.lint.checks) + compileOnly(libs.auto.service.annotations) + kapt(libs.auto.service) + testImplementation(libs.lint.core) + testImplementation(libs.lint.tests) + testImplementation(libs.junit) +} diff --git a/formula-rxjava3/build.gradle b/formula-rxjava3/build.gradle deleted file mode 100644 index 4a272b87b..000000000 --- a/formula-rxjava3/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'kotlin' -apply plugin: 'org.jetbrains.dokka' - -apply from: rootProject.file('.buildscript/configure-signing.gradle') - -repositories { - mavenCentral() -} - -tasks.withType(JavaCompile) { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation libraries.kotlin - - api project(":formula") - api libraries.rxjava - - testImplementation project(":formula-test") - testImplementation libraries.truth - testImplementation libraries.junit - testImplementation libraries.rxrelays -} diff --git a/formula-rxjava3/build.gradle.kts b/formula-rxjava3/build.gradle.kts new file mode 100644 index 000000000..2851693c4 --- /dev/null +++ b/formula-rxjava3/build.gradle.kts @@ -0,0 +1,35 @@ +plugins { + id("kotlin") + id("org.jetbrains.dokka") +} + +apply { + from("$rootDir/.buildscript/configure-signing.gradle") +} + +repositories { + mavenCentral() +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(libs.kotlin) + + api(project(":formula")) + api(libs.rxjava) + + testImplementation(project(":formula-test")) + testImplementation(libs.truth) + testImplementation(libs.junit) + testImplementation(libs.rxrelays) +} diff --git a/formula-test/build.gradle b/formula-test/build.gradle deleted file mode 100644 index 0dda0fe04..000000000 --- a/formula-test/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -apply plugin: 'kotlin' -apply plugin: 'org.jetbrains.dokka' - -apply from: rootProject.file('.buildscript/configure-signing.gradle') - -sourceCompatibility = 1.8 // java 8 -targetCompatibility = 1.8 - -repositories { - mavenCentral() -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation libraries.kotlin - api project(":formula-rxjava3") - - testImplementation libraries.truth - testImplementation libraries.junit - testImplementation libraries.rxrelays -} diff --git a/formula-test/build.gradle.kts b/formula-test/build.gradle.kts new file mode 100644 index 000000000..0c3b9b2e4 --- /dev/null +++ b/formula-test/build.gradle.kts @@ -0,0 +1,32 @@ +plugins { + id("kotlin") + id("org.jetbrains.dokka") +} + +apply { + from("$rootDir/.buildscript/configure-signing.gradle") +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +repositories { + mavenCentral() +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(libs.kotlin) + api(project(":formula-rxjava3")) + + testImplementation(libs.truth) + testImplementation(libs.junit) + testImplementation(libs.rxrelays) +} diff --git a/formula/build.gradle b/formula/build.gradle deleted file mode 100644 index 7213e6588..000000000 --- a/formula/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'kotlin' -apply plugin: 'org.jetbrains.dokka' - -apply from: rootProject.file('.buildscript/configure-signing.gradle') - -repositories { - mavenCentral() -} - -tasks.withType(JavaCompile) { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation libraries.kotlin - - testImplementation project(":formula-test") - testImplementation project(":formula-rxjava3") - testImplementation project(":formula-coroutines") - testImplementation libraries.truth - testImplementation libraries.junit - testImplementation libraries.rxrelays - testImplementation libraries.coroutinesTest -} diff --git a/formula/build.gradle.kts b/formula/build.gradle.kts new file mode 100644 index 000000000..0ec95f5a7 --- /dev/null +++ b/formula/build.gradle.kts @@ -0,0 +1,36 @@ +plugins { + id("kotlin") + id("org.jetbrains.dokka") +} + +apply { + from("$rootDir/.buildscript/configure-signing.gradle") +} + +repositories { + mavenCentral() +} + + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(libs.kotlin) + + testImplementation(project(":formula-test")) + testImplementation(project(":formula-rxjava3")) + testImplementation(project(":formula-coroutines")) + testImplementation(libs.truth) + testImplementation(libs.junit) + testImplementation(libs.rxrelays) + testImplementation(libs.coroutines.test) +} diff --git a/gradle/jacoco.gradle b/gradle/jacoco.gradle new file mode 100644 index 000000000..2eaf7b6a5 --- /dev/null +++ b/gradle/jacoco.gradle @@ -0,0 +1,21 @@ +apply plugin: "com.vanniktech.android.junit.jacoco" + +junitJacoco { + // WARNING! Don"t upgrade unless https://github.com/Malinskiy/danger-jacoco/issues/10 is fixed + jacocoVersion = '0.8.2' + excludes = [ + // Defaults + '**/androidx/**/*.*', + '**/*$$*', + '**/BuildConfig.*', + '**/Manifest*.*', + '**/*$Lambda$*.*', // Jacoco can not handle several "$" in class name. + '**/*$inlined$*.*', // Kotlin specific, Jacoco can not handle several "$" in class name. + '**/com/instacart/formula/test/**/*.*' + ] + ignoreProjects = [ + "samples/*" + ] + includeNoLocationClasses = true + includeInstrumentationCoverageInMergedReport = true +} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 000000000..7c023a87c --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,77 @@ +[versions] +android-gradle = "7.0.4" +dokka-gradle = "1.4.32" + +minSdk = "21" +compileSdk = "30" +targetSdk = "30" + +kotlin = "1.5.21" +coroutines = "1.5.2" +compose = "1.0.1" + +androidX = "1.2.0" +lifecycle = "2.2.0" +lifecycleKtx = '2.4.0-alpha03' +androidTest = "1.4.0" +espresso = "3.4.0" +robolectric = "4.6.1" +lint = "30.0.0" +autoService = "1.0-rc7" + +[libraries] +android-gradle = { module = "com.android.tools.build:gradle", version.ref = "android-gradle" } +kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +dokka-gradle = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka-gradle" } +dokka-android-gradle = { module = "org.jetbrains.dokka:android-documentation-plugin", version.ref = "dokka-gradle" } +maven-publish-gradle = { module = "com.vanniktech:gradle-maven-publish-plugin", version = "0.14.2" } +version-gradle = { module = "com.github.ben-manes:gradle-versions-plugin", version = "0.38.0" } +jacoco-gradle = { module = "com.vanniktech:gradle-android-junit-jacoco-plugin", version = "0.16.0" } + +kotlin = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } +kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } + +coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } +coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } + +compose-ui = { module = "androidx.compose.ui:ui", version.ref = "compose" } +compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose" } +compose-material = { module = "androidx.compose.material:material", version.ref = "compose" } +compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" } +compose-rxjava3 = { module = "androidx.compose.runtime:runtime-rxjava3", version.ref = "compose" } + +androidx-annotation = { module = "androidx.annotation:annotation", version.ref = "androidX" } +androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidX" } +androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "androidX" } +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version = "2.1.0" } +androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.3.1"} +androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version = "1.3.1" } +androidx-test-core-ktx = { module = "androidx.test:core-ktx", name = "core-ktx", version.ref = "androidTest" } +androidx-test-rules = { module = "androidx.test:rules", version.ref = "androidTest" } +androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidTest" } +androidx-test-junit = { module = "androidx.test.ext:junit", version = "1.1.0" } + +lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycle" } +lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleKtx" } + +espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" } +robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" } + +rxjava = { module = "io.reactivex.rxjava3:rxjava", version = "3.1.1" } +rxandroid = { module = "io.reactivex.rxjava3:rxandroid", version = "3.0.0" } +rxrelay = { module = "com.jakewharton.rxrelay3:rxrelay", version = "3.0.1" } + +truth = { module = "com.google.truth:truth", version = "1.1.3" } +junit = { module = "junit:junit", version = "4.13.2" } +rxrelays = { module = "com.jakewharton.rxrelay3:rxrelay", version = "3.0.1" } + +mockito-inline = { module = "org.mockito:mockito-inline", version = "3.12.4" } +mockito-kotlin = { module = "com.nhaarman:mockito-kotlin", version = "1.6.0" } + +lint-core = { module = "com.android.tools.lint:lint", version.ref = "lint" } +lint-api = { module = "com.android.tools.lint:lint-api", version.ref = "lint" } +lint-checks = { module = "com.android.tools.lint:lint-checks", version.ref = "lint" } +lint-tests = { module = "com.android.tools.lint:lint-tests", version.ref = "lint" } + +auto-service = { module = "com.google.auto.service:auto-service ", version.ref = "autoService" } +auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c02..7454180f2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 29e413457..ffed3a254 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 4f906e0c8..1b6c78733 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,67 +17,101 @@ # ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -106,80 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/samples/composition/build.gradle b/samples/composition/build.gradle deleted file mode 100644 index 33edd4593..000000000 --- a/samples/composition/build.gradle +++ /dev/null @@ -1,59 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - defaultConfig { - applicationId "com.instacart.formula.samples.composition" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-rxjava3") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.androidx.recyclerview - implementation libraries.androidx.constraintlayout - implementation libraries.rxrelays - implementation libraries.rxandroid - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric - testImplementation project(":formula-test") -} diff --git a/samples/composition/build.gradle.kts b/samples/composition/build.gradle.kts new file mode 100644 index 000000000..ab1f8d315 --- /dev/null +++ b/samples/composition/build.gradle.kts @@ -0,0 +1,61 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.instacart.formula.samples.composition" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.recyclerview) + implementation(libs.androidx.constraintlayout) + implementation(libs.rxrelay) + implementation(libs.rxandroid) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) + testImplementation(project(":formula-test")) +} diff --git a/samples/counter/build.gradle b/samples/counter/build.gradle deleted file mode 100644 index 104290ca1..000000000 --- a/samples/counter/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - defaultConfig { - applicationId "com.instacart.formula.counter" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-rxjava3") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.rxrelays - implementation libraries.rxandroid - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric - testImplementation project(":formula-test") -} diff --git a/samples/counter/build.gradle.kts b/samples/counter/build.gradle.kts new file mode 100644 index 000000000..3f5cb13ca --- /dev/null +++ b/samples/counter/build.gradle.kts @@ -0,0 +1,59 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.instacart.formula.counter" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.rxrelay) + implementation(libs.rxandroid) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) + testImplementation(project(":formula-test")) +} diff --git a/samples/custom-network-state-stream/build.gradle b/samples/custom-network-state-stream/build.gradle deleted file mode 100644 index c222b39b1..000000000 --- a/samples/custom-network-state-stream/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - defaultConfig { - applicationId "com.instacart.formula.samples.networkstate" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-rxjava3") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.rxrelays - implementation libraries.rxandroid - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric - testImplementation project(":formula-test") -} diff --git a/samples/custom-network-state-stream/build.gradle.kts b/samples/custom-network-state-stream/build.gradle.kts new file mode 100644 index 000000000..ddf07628c --- /dev/null +++ b/samples/custom-network-state-stream/build.gradle.kts @@ -0,0 +1,59 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.instacart.formula.samples.networkstate" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.rxrelay) + implementation(libs.rxandroid) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) + testImplementation(project(":formula-test")) +} \ No newline at end of file diff --git a/samples/stopwatch-compose/build.gradle b/samples/stopwatch-compose/build.gradle deleted file mode 100644 index 39c78aa1e..000000000 --- a/samples/stopwatch-compose/build.gradle +++ /dev/null @@ -1,78 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - - defaultConfig { - applicationId "com.instacart.formula.compose.stopwatch" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildFeatures { - compose true - } - - // Set both the Java and Kotlin compilers to target Java 8. - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = "1.8" - useIR = true - } - - composeOptions { - kotlinCompilerVersion constants.kotlinVersion - kotlinCompilerExtensionVersion composeVersion - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -dependencies { - implementation project(":formula-rxjava3") - implementation project(":formula-android") - implementation project(":formula-android-compose") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.rxrelays - implementation libraries.rxandroid - - - // You also need to include the following Compose toolkit dependencies. - implementation libraries.androidx.compose.ui - implementation libraries.androidx.compose.uiTooling - implementation libraries.androidx.compose.foundation - implementation libraries.androidx.compose.material - implementation libraries.androidx.compose.rxjava3 - implementation libraries.androidx.activity.compose - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric - testImplementation project(":formula-test") -} diff --git a/samples/stopwatch-compose/build.gradle.kts b/samples/stopwatch-compose/build.gradle.kts new file mode 100644 index 000000000..909a01250 --- /dev/null +++ b/samples/stopwatch-compose/build.gradle.kts @@ -0,0 +1,73 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.instacart.formula.compose.stopwatch" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildFeatures { + compose = true + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + composeOptions { + kotlinCompilerVersion = libs.versions.kotlin.get() + kotlinCompilerExtensionVersion = libs.versions.compose.get() + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + implementation(project(":formula-android")) + implementation(project(":formula-android-compose")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.rxrelay) + implementation(libs.rxandroid) + + + // You also need to include the following Compose toolkit dependencies. + implementation(libs.compose.ui) + implementation(libs.compose.ui.tooling) + implementation(libs.compose.foundation) + implementation(libs.compose.material) + implementation(libs.compose.rxjava3) + implementation(libs.androidx.activity.compose) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) + testImplementation(project(":formula-test")) +} diff --git a/samples/stopwatch-coroutines/build.gradle b/samples/stopwatch-coroutines/build.gradle deleted file mode 100644 index 04b403643..000000000 --- a/samples/stopwatch-coroutines/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - defaultConfig { - applicationId "com.instacart.formula.stopwatch.coroutines" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-coroutines") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.androidx.lifecycle.runtimektx - implementation libraries.androidx.activity.ktx - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner -} diff --git a/samples/stopwatch-coroutines/build.gradle.kts b/samples/stopwatch-coroutines/build.gradle.kts new file mode 100644 index 000000000..d9c659d35 --- /dev/null +++ b/samples/stopwatch-coroutines/build.gradle.kts @@ -0,0 +1,56 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.instacart.formula.stopwatch.coroutines" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-coroutines")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.ktx) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) +} diff --git a/samples/stopwatch/build.gradle b/samples/stopwatch/build.gradle deleted file mode 100644 index ed67fc435..000000000 --- a/samples/stopwatch/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - defaultConfig { - applicationId "com.instacart.formula.stopwatch" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-rxjava3") - - implementation libraries.kotlin - implementation libraries.androidx.appcompat - implementation libraries.rxrelays - implementation libraries.rxandroid - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric - testImplementation project(":formula-test") -} diff --git a/samples/stopwatch/build.gradle.kts b/samples/stopwatch/build.gradle.kts new file mode 100644 index 000000000..a88f04842 --- /dev/null +++ b/samples/stopwatch/build.gradle.kts @@ -0,0 +1,60 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.instacart.formula.samples.composition" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + + implementation(libs.kotlin) + implementation(libs.androidx.appcompat) + implementation(libs.rxrelay) + implementation(libs.rxandroid) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.androidx.test.rules) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) + testImplementation(project(":formula-test")) +} + diff --git a/samples/todoapp/build.gradle b/samples/todoapp/build.gradle deleted file mode 100644 index 6093cb030..000000000 --- a/samples/todoapp/build.gradle +++ /dev/null @@ -1,65 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: "kotlin-parcelize" - -android { - compileSdkVersion constants.compileSdk - defaultConfig { - applicationId "com.examples.todoapp" - minSdkVersion constants.minSdk - targetSdkVersion constants.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - - testOptions { - unitTests { - includeAndroidResources = true - } - } -} - -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = "1.8" - } -} - -dependencies { - implementation project(":formula-rxjava3") - implementation project(":formula-android") - - implementation libraries.androidx.appcompat - implementation libraries.androidx.recyclerview - implementation libraries.androidx.constraintlayout - - implementation libraries.kotlin - implementation libraries.rxrelays - - implementation libraries.androidx.lifecycle.extensions - - testImplementation libraries.junit - testImplementation "com.google.truth:truth:$truthVersion" - testImplementation "org.mockito:mockito-inline:$mockitoVersion" - testImplementation "com.nhaarman:mockito-kotlin:$mockitoKotlinVersion" - testImplementation libraries.kotlinReflect - testImplementation project(":formula-test") - - testImplementation libraries.androidx.test.rules - testImplementation libraries.androidx.test.runner - testImplementation libraries.androidx.test.espresso.core - testImplementation libraries.robolectric -} diff --git a/samples/todoapp/build.gradle.kts b/samples/todoapp/build.gradle.kts new file mode 100644 index 000000000..d5b9a5fa2 --- /dev/null +++ b/samples/todoapp/build.gradle.kts @@ -0,0 +1,67 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("kotlin-parcelize") +} + +android { + compileSdk = libs.versions.compileSdk.get().toInt() + + defaultConfig { + applicationId = "com.examples.todoapp" + minSdk = libs.versions.minSdk.get().toInt() + targetSdk = libs.versions.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + } + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } +} + +tasks.withType().all { + kotlinOptions { + jvmTarget = "1.8" + } +} + +dependencies { + implementation(project(":formula-rxjava3")) + implementation(project(":formula-android")) + + implementation(libs.androidx.appcompat) + implementation(libs.androidx.recyclerview) + implementation(libs.androidx.constraintlayout) + + implementation(libs.kotlin) + implementation(libs.rxrelay) + + implementation(libs.lifecycle.extensions) + + testImplementation(libs.junit) + testImplementation(libs.truth) + testImplementation(libs.mockito.inline) + testImplementation(libs.mockito.kotlin) + testImplementation(libs.kotlin.reflect) + testImplementation(project(":formula-test")) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.androidx.test.runner) + testImplementation(libs.espresso.core) + testImplementation(libs.robolectric) +} diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 117ab2ed3..000000000 --- a/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -include ':formula' -include ':formula-android' -include ':formula-android-compose' -include ':formula-android-tests' -include ':formula-lint' -include ':formula-rxjava3' -include ':formula-coroutines' -include ':formula-test' -include ':samples:composition' -include ':samples:counter' -include ':samples:custom-network-state-stream' -include ':samples:stopwatch' -include ':samples:stopwatch-coroutines' -include ':samples:stopwatch-compose' -include ':samples:todoapp' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..2046f0c77 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,21 @@ +enableFeaturePreview("VERSION_CATALOGS") + +include( + ":formula", + ":formula-android", + ":formula-android-compose", + ":formula-android-tests", + ":formula-lint", + ":formula-rxjava3", + ":formula-coroutines", + ":formula-test", +) +include( + ":samples:composition", + ":samples:counter", + ":samples:custom-network-state-stream", + ":samples:stopwatch", + ":samples:stopwatch-coroutines", + ":samples:stopwatch-compose", + ":samples:todoapp" +)