From 4de105e4002d143c0006a81fa257dcb1ba3c877b Mon Sep 17 00:00:00 2001 From: Reza Taghizadeh Date: Mon, 17 Aug 2026 21:59:32 +0200 Subject: [PATCH] build: establish Kotlin library foundation and shared contract --- .github/workflows/ci.yml | 26 +++++ CHANGELOG.md | 10 ++ LICENSE | 21 ++++ README.md | 37 +++++++ build.gradle.kts | 3 +- contract/README.md | 22 ++++ contract/core_mvp.schema.json | 29 +++++ contract/core_mvp_cases.json | 99 ++++++++++++++++++ doc/architecture.md | 27 +++++ flextrack/.gitignore | 1 + flextrack/build.gradle.kts | 88 ++++++++++++++++ flextrack/consumer-rules.pro | 1 + flextrack/src/main/AndroidManifest.xml | 2 + .../dev/taghizadeh/flextrack/FlexTrack.kt | 10 ++ .../dev/taghizadeh/flextrack/FlexTrackTest.kt | 12 +++ gradle/libs.versions.toml | 4 +- {app => sample}/.gitignore | 0 {app => sample}/build.gradle.kts | 3 +- {app => sample}/proguard-rules.pro | 0 .../sample/ExampleInstrumentedTest.kt | 0 {app => sample}/src/main/AndroidManifest.xml | 0 .../drawable-v24/ic_launcher_foreground.xml | 0 .../res/drawable/ic_launcher_background.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin .../res/mipmap-hdpi/ic_launcher_round.webp | Bin .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin .../res/mipmap-mdpi/ic_launcher_round.webp | Bin .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin .../src/main/res/values-night/themes.xml | 0 .../src/main/res/values/colors.xml | 0 .../src/main/res/values/strings.xml | 0 .../src/main/res/values/themes.xml | 0 .../src/main/res/xml/backup_rules.xml | 0 .../main/res/xml/data_extraction_rules.xml | 0 .../flextrack/sample/ExampleUnitTest.kt | 0 settings.gradle.kts | 5 +- 43 files changed, 395 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 contract/README.md create mode 100644 contract/core_mvp.schema.json create mode 100644 contract/core_mvp_cases.json create mode 100644 doc/architecture.md create mode 100644 flextrack/.gitignore create mode 100644 flextrack/build.gradle.kts create mode 100644 flextrack/consumer-rules.pro create mode 100644 flextrack/src/main/AndroidManifest.xml create mode 100644 flextrack/src/main/kotlin/dev/taghizadeh/flextrack/FlexTrack.kt create mode 100644 flextrack/src/test/kotlin/dev/taghizadeh/flextrack/FlexTrackTest.kt rename {app => sample}/.gitignore (100%) rename {app => sample}/build.gradle.kts (96%) rename {app => sample}/proguard-rules.pro (100%) rename {app => sample}/src/androidTest/java/dev/taghizadeh/flextrack/sample/ExampleInstrumentedTest.kt (100%) rename {app => sample}/src/main/AndroidManifest.xml (100%) rename {app => sample}/src/main/res/drawable-v24/ic_launcher_foreground.xml (100%) rename {app => sample}/src/main/res/drawable/ic_launcher_background.xml (100%) rename {app => sample}/src/main/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename {app => sample}/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename {app => sample}/src/main/res/mipmap-hdpi/ic_launcher.webp (100%) rename {app => sample}/src/main/res/mipmap-hdpi/ic_launcher_round.webp (100%) rename {app => sample}/src/main/res/mipmap-mdpi/ic_launcher.webp (100%) rename {app => sample}/src/main/res/mipmap-mdpi/ic_launcher_round.webp (100%) rename {app => sample}/src/main/res/mipmap-xhdpi/ic_launcher.webp (100%) rename {app => sample}/src/main/res/mipmap-xhdpi/ic_launcher_round.webp (100%) rename {app => sample}/src/main/res/mipmap-xxhdpi/ic_launcher.webp (100%) rename {app => sample}/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp (100%) rename {app => sample}/src/main/res/mipmap-xxxhdpi/ic_launcher.webp (100%) rename {app => sample}/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp (100%) rename {app => sample}/src/main/res/values-night/themes.xml (100%) rename {app => sample}/src/main/res/values/colors.xml (100%) rename {app => sample}/src/main/res/values/strings.xml (100%) rename {app => sample}/src/main/res/values/themes.xml (100%) rename {app => sample}/src/main/res/xml/backup_rules.xml (100%) rename {app => sample}/src/main/res/xml/data_extraction_rules.xml (100%) rename {app => sample}/src/test/java/dev/taghizadeh/flextrack/sample/ExampleUnitTest.kt (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6910ea3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + cache: gradle + - uses: gradle/actions/setup-gradle@v4 + - name: Validate wrapper + uses: gradle/actions/wrapper-validation@v4 + - name: Build, test, lint, and verify local publication + run: ./gradlew build lint :flextrack:publishToMavenLocal --stacktrace diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d35f518 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## Unreleased + +### Added + +- Android library and sample module foundation. +- Maven publication metadata and local publishing support. +- FlexTrack Core Specification 1.0.0 contract baseline. +- CI quality gates for build, unit tests, lint, and publication verification. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2d2d250 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025-2026 Reza Taghizadeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..24e5eec --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +# FlexTrack Kotlin + +Native Android/Kotlin implementation of FlexTrack: consent-aware analytics +routing with deterministic cross-SDK behavior. + +The Kotlin SDK targets Android API 21+ and implements +[FlexTrack Core Specification 1.0.0](contract/README.md), shared with +[FlexTrack Flutter 2.1.0](https://pub.dev/packages/flex_track). + +## Project status + +The SDK is under active development toward Kotlin 1.0.0. The current version is +`0.1.0-SNAPSHOT` and is not ready for production use. + +## Modules + +- `flextrack`: publishable Android library (`AAR`). +- `sample`: Android application that consumes `flextrack` as a project dependency. +- `contract`: shared specification and deterministic Flutter/Kotlin fixtures. + +## Build + +```bash +./gradlew build +./gradlew :flextrack:publishToMavenLocal +``` + +## Roadmap + +1. Library foundation and shared contract. +2. Event, enrichment, routing, consent, and deterministic sampling. +3. Tracker runtime, client lifecycle, debug records, and conformance. +4. Sample application, documentation, and Kotlin 1.0.0 release. + +## License + +MIT diff --git a/build.gradle.kts b/build.gradle.kts index 922f551..67f437e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.application) apply false + alias(libs.plugins.android.library) apply false alias(libs.plugins.kotlin.android) apply false -} \ No newline at end of file +} diff --git a/contract/README.md b/contract/README.md new file mode 100644 index 0000000..1a5cf08 --- /dev/null +++ b/contract/README.md @@ -0,0 +1,22 @@ +# FlexTrack shared contract + +This directory contains the language-neutral inputs used to keep the Flutter +and Kotlin SDKs behaviorally compatible. + +- Core specification: `1.0.0` +- Fixture version: `1.0.0` +- Flutter reference: `flex_track` `v2.1.0` +- Flutter reference commit: `78d7f46c2479b9680268ab794443375e3959d441` + +Canonical sources: + +- [Core MVP specification](https://github.com/alirezat66/flex_track/blob/v2.1.0/doc/core-mvp-specification.md) +- [Conformance runner contract](https://github.com/alirezat66/flex_track/blob/v2.1.0/doc/conformance.md) +- [Flutter fixtures](https://github.com/alirezat66/flex_track/tree/v2.1.0/test/fixtures/conformance) + +The JSON files in this directory are vendored so Kotlin CI never depends on +network availability or a moving Flutter branch. Updates require an explicit +fixture version change and source-reference update. + +Queues, persistence, retry/backoff, session management, SDK-owned identity, +and optimized batching are intentionally outside Core MVP 1.0.0. diff --git a/contract/core_mvp.schema.json b/contract/core_mvp.schema.json new file mode 100644 index 0000000..3e80214 --- /dev/null +++ b/contract/core_mvp.schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://flextrack.taghizadeh.dev/schemas/core-mvp-1.0.0.json", + "title": "FlexTrack Core MVP conformance fixtures", + "type": "object", + "required": ["specVersion", "fixtureVersion", "cases"], + "properties": { + "specVersion": {"const": "1.0.0"}, + "fixtureVersion": {"type": "string", "pattern": "^1\\.[0-9]+\\.[0-9]+$"}, + "cases": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": ["id", "behavior", "input", "expected"], + "properties": { + "id": {"type": "string", "minLength": 1}, + "behavior": { + "enum": ["routing", "consent", "sampling", "enrichment", "debug"] + }, + "input": {"type": "object"}, + "expected": {"type": "object"} + }, + "additionalProperties": false + } + } + }, + "additionalProperties": false +} diff --git a/contract/core_mvp_cases.json b/contract/core_mvp_cases.json new file mode 100644 index 0000000..4e841a0 --- /dev/null +++ b/contract/core_mvp_cases.json @@ -0,0 +1,99 @@ +{ + "$schema": "core_mvp.schema.json", + "specVersion": "1.0.0", + "fixtureVersion": "1.0.0", + "cases": [ + { + "id": "routing.priority-overlap", + "behavior": "routing", + "input": { + "event": {"name": "purchase", "category": "business"}, + "availableTrackers": ["analytics", "archive"], + "rules": [ + {"category": "business", "priority": 10, "targets": ["analytics"]}, + {"default": true, "priority": 0, "targets": ["archive"]} + ] + }, + "expected": {"targets": ["analytics"], "appliedPriorities": [10]} + }, + { + "id": "routing.same-tier-merge", + "behavior": "routing", + "input": { + "event": {"name": "purchase"}, + "availableTrackers": ["analytics", "archive"], + "rules": [ + {"nameContains": "purchase", "priority": 5, "targets": ["analytics"]}, + {"nameContains": "purchase", "priority": 5, "targets": ["archive", "analytics"]} + ] + }, + "expected": {"targets": ["analytics", "archive"], "appliedPriorities": [5, 5]} + }, + { + "id": "routing.default-group-fallback", + "behavior": "routing", + "input": { + "event": {"name": "unmatched"}, + "availableTrackers": ["archive"], + "defaultGroup": ["archive"], + "rules": [{"nameContains": "purchase", "priority": 5, "targets": ["archive"]}] + }, + "expected": {"targets": ["archive"], "appliedPriorities": [0]} + }, + { + "id": "consent.general-missing", + "behavior": "consent", + "input": { + "event": {"name": "view", "requiresConsent": true}, + "generalConsent": false, + "piiConsent": false, + "rule": {"requireConsent": true, "targets": ["analytics"]} + }, + "expected": {"targets": [], "skipReasons": ["Consent requirements not met"]} + }, + { + "id": "consent.pii-missing", + "behavior": "consent", + "input": { + "event": {"name": "profile", "containsPII": true, "requiresConsent": true}, + "generalConsent": true, + "piiConsent": false, + "rule": {"requireConsent": true, "requirePIIConsent": true, "targets": ["analytics"]} + }, + "expected": {"targets": [], "skipReasons": ["Consent requirements not met"]} + }, + { + "id": "sampling.unicode-utf8", + "behavior": "sampling", + "input": {"identity": "नमस्ते", "sampleRate": 0.25}, + "expected": {"hash": 538106393, "accepted": true} + }, + { + "id": "enrichment.identity-and-properties", + "behavior": "enrichment", + "input": { + "eventId": "fixture-event-1", + "timestamp": "2026-08-17T12:30:00.000Z", + "name": "purchase", + "properties": {"plan": "free"}, + "extraProperties": {"plan": "pro", "route": "/pay"} + }, + "expected": { + "eventId": "fixture-event-1", + "timestamp": "2026-08-17T12:30:00.000Z", + "name": "purchase", + "properties": {"plan": "pro", "route": "/pay"} + } + }, + { + "id": "debug.routing-decision", + "behavior": "debug", + "input": { + "event": {"name": "purchase"}, + "availableTrackers": ["analytics"], + "rules": [{"nameContains": "purchase", "priority": 7, "targets": ["analytics"]}] + }, + "expected": {"targetTrackers": ["analytics"], "successfulTrackerIds": ["analytics"]} + } + ] +} diff --git a/doc/architecture.md b/doc/architecture.md new file mode 100644 index 0000000..1c20ff8 --- /dev/null +++ b/doc/architecture.md @@ -0,0 +1,27 @@ +# Architecture + +FlexTrack Kotlin follows the language-neutral Core Specification rather than a +line-by-line Dart translation. + +The `flextrack` module is organized into four layers: + +1. **Model** — immutable events, routing rules, groups, and result values. +2. **Policy** — enrichment, consent gates, deterministic sampling, and routing. +3. **Runtime** — tracker registry, event processor, and isolated clients. +4. **Diagnostics** — debug decisions and conformance reporting. + +Android framework usage stays at the library boundary. Core decisions remain +deterministic JVM-testable Kotlin so they can be compared directly with the +shared Flutter fixtures. Offline persistence, retries, and SDK-owned identity +are deliberately deferred until a later versioned contract. + +## Module dependency direction + +```text +sample -> flextrack + +diagnostics -> runtime -> policy -> model +``` + +Dependencies MUST point to the right in this diagram. The Core model never +depends on tracker vendors, application code, or the sample module. diff --git a/flextrack/.gitignore b/flextrack/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/flextrack/.gitignore @@ -0,0 +1 @@ +/build diff --git a/flextrack/build.gradle.kts b/flextrack/build.gradle.kts new file mode 100644 index 0000000..742ad75 --- /dev/null +++ b/flextrack/build.gradle.kts @@ -0,0 +1,88 @@ +plugins { + alias(libs.plugins.android.library) + alias(libs.plugins.kotlin.android) + `maven-publish` +} + +group = "dev.taghizadeh.flextrack" +version = "0.1.0-SNAPSHOT" + +android { + namespace = "dev.taghizadeh.flextrack" + compileSdk { + version = release(36) + } + + defaultConfig { + minSdk = 21 + consumerProguardFiles("consumer-rules.pro") + } + + buildTypes { + release { + isMinifyEnabled = false + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = "11" + } + + testOptions { + unitTests.all { + it.useJUnitPlatform() + } + } + + publishing { + singleVariant("release") { + withSourcesJar() + } + } +} + +dependencies { + testImplementation(libs.junit.jupiter) +} + +publishing { + publications { + register("release") { + groupId = project.group.toString() + artifactId = "flextrack" + version = project.version.toString() + + afterEvaluate { + from(components["release"]) + } + + pom { + name.set("FlexTrack Kotlin") + description.set("Consent-aware, deterministic analytics routing for Android and Kotlin.") + url.set("https://github.com/alirezat66/flex_track_kotlin") + licenses { + license { + name.set("MIT License") + url.set("https://opensource.org/licenses/MIT") + } + } + developers { + developer { + id.set("alirezat66") + name.set("Reza Taghizadeh") + } + } + scm { + url.set("https://github.com/alirezat66/flex_track_kotlin") + connection.set("scm:git:https://github.com/alirezat66/flex_track_kotlin.git") + developerConnection.set("scm:git:ssh://git@github.com/alirezat66/flex_track_kotlin.git") + } + } + } + } +} diff --git a/flextrack/consumer-rules.pro b/flextrack/consumer-rules.pro new file mode 100644 index 0000000..e7b4883 --- /dev/null +++ b/flextrack/consumer-rules.pro @@ -0,0 +1 @@ +# FlexTrack has no reflection-based runtime in the Core MVP. diff --git a/flextrack/src/main/AndroidManifest.xml b/flextrack/src/main/AndroidManifest.xml new file mode 100644 index 0000000..8072ee0 --- /dev/null +++ b/flextrack/src/main/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/flextrack/src/main/kotlin/dev/taghizadeh/flextrack/FlexTrack.kt b/flextrack/src/main/kotlin/dev/taghizadeh/flextrack/FlexTrack.kt new file mode 100644 index 0000000..ae99a15 --- /dev/null +++ b/flextrack/src/main/kotlin/dev/taghizadeh/flextrack/FlexTrack.kt @@ -0,0 +1,10 @@ +package dev.taghizadeh.flextrack + +/** Package metadata for the FlexTrack Kotlin SDK. */ +public object FlexTrack { + /** Current pre-release SDK version. */ + public const val VERSION: String = "0.1.0-SNAPSHOT" + + /** Language-neutral FlexTrack Core specification implemented by this SDK. */ + public const val CORE_SPEC_VERSION: String = "1.0.0" +} diff --git a/flextrack/src/test/kotlin/dev/taghizadeh/flextrack/FlexTrackTest.kt b/flextrack/src/test/kotlin/dev/taghizadeh/flextrack/FlexTrackTest.kt new file mode 100644 index 0000000..2227a10 --- /dev/null +++ b/flextrack/src/test/kotlin/dev/taghizadeh/flextrack/FlexTrackTest.kt @@ -0,0 +1,12 @@ +package dev.taghizadeh.flextrack + +import org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.Test + +class FlexTrackTest { + @Test + fun `package metadata identifies SDK and contract versions`() { + assertEquals("0.1.0-SNAPSHOT", FlexTrack.VERSION) + assertEquals("1.0.0", FlexTrack.CORE_SPEC_VERSION) + } +} diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b335768..0e544aa 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,6 +3,7 @@ agp = "8.13.2" kotlin = "2.0.21" coreKtx = "1.10.1" junit = "4.13.2" +junitJupiter = "5.11.4" junitVersion = "1.1.5" espressoCore = "3.5.1" appcompat = "1.6.1" @@ -11,6 +12,7 @@ material = "1.10.0" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } junit = { group = "junit", name = "junit", version.ref = "junit" } +junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junitJupiter" } androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" } androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" } androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } @@ -18,5 +20,5 @@ material = { group = "com.google.android.material", name = "material", version.r [plugins] android-application = { id = "com.android.application", version.ref = "agp" } +android-library = { id = "com.android.library", version.ref = "agp" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } - diff --git a/app/.gitignore b/sample/.gitignore similarity index 100% rename from app/.gitignore rename to sample/.gitignore diff --git a/app/build.gradle.kts b/sample/build.gradle.kts similarity index 96% rename from app/build.gradle.kts rename to sample/build.gradle.kts index 36a4c39..fe48ee6 100644 --- a/app/build.gradle.kts +++ b/sample/build.gradle.kts @@ -38,10 +38,11 @@ android { } dependencies { + implementation(project(":flextrack")) implementation(libs.androidx.core.ktx) implementation(libs.androidx.appcompat) implementation(libs.material) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) androidTestImplementation(libs.androidx.espresso.core) -} \ No newline at end of file +} diff --git a/app/proguard-rules.pro b/sample/proguard-rules.pro similarity index 100% rename from app/proguard-rules.pro rename to sample/proguard-rules.pro diff --git a/app/src/androidTest/java/dev/taghizadeh/flextrack/sample/ExampleInstrumentedTest.kt b/sample/src/androidTest/java/dev/taghizadeh/flextrack/sample/ExampleInstrumentedTest.kt similarity index 100% rename from app/src/androidTest/java/dev/taghizadeh/flextrack/sample/ExampleInstrumentedTest.kt rename to sample/src/androidTest/java/dev/taghizadeh/flextrack/sample/ExampleInstrumentedTest.kt diff --git a/app/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml similarity index 100% rename from app/src/main/AndroidManifest.xml rename to sample/src/main/AndroidManifest.xml diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/sample/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from app/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to sample/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/sample/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from app/src/main/res/drawable/ic_launcher_background.xml rename to sample/src/main/res/drawable/ic_launcher_background.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to sample/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to sample/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/sample/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to sample/src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/sample/src/main/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_launcher_round.webp rename to sample/src/main/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/sample/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to sample/src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/sample/src/main/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_launcher_round.webp rename to sample/src/main/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/sample/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to sample/src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp rename to sample/src/main/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/sample/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to sample/src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp rename to sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to sample/src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/app/src/main/res/values-night/themes.xml b/sample/src/main/res/values-night/themes.xml similarity index 100% rename from app/src/main/res/values-night/themes.xml rename to sample/src/main/res/values-night/themes.xml diff --git a/app/src/main/res/values/colors.xml b/sample/src/main/res/values/colors.xml similarity index 100% rename from app/src/main/res/values/colors.xml rename to sample/src/main/res/values/colors.xml diff --git a/app/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml similarity index 100% rename from app/src/main/res/values/strings.xml rename to sample/src/main/res/values/strings.xml diff --git a/app/src/main/res/values/themes.xml b/sample/src/main/res/values/themes.xml similarity index 100% rename from app/src/main/res/values/themes.xml rename to sample/src/main/res/values/themes.xml diff --git a/app/src/main/res/xml/backup_rules.xml b/sample/src/main/res/xml/backup_rules.xml similarity index 100% rename from app/src/main/res/xml/backup_rules.xml rename to sample/src/main/res/xml/backup_rules.xml diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/sample/src/main/res/xml/data_extraction_rules.xml similarity index 100% rename from app/src/main/res/xml/data_extraction_rules.xml rename to sample/src/main/res/xml/data_extraction_rules.xml diff --git a/app/src/test/java/dev/taghizadeh/flextrack/sample/ExampleUnitTest.kt b/sample/src/test/java/dev/taghizadeh/flextrack/sample/ExampleUnitTest.kt similarity index 100% rename from app/src/test/java/dev/taghizadeh/flextrack/sample/ExampleUnitTest.kt rename to sample/src/test/java/dev/taghizadeh/flextrack/sample/ExampleUnitTest.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index fce2fd0..1bb4daf 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -19,5 +19,6 @@ dependencyResolutionManagement { } } -rootProject.name = "FlexTrack Kotlin" -include(":app") +rootProject.name = "flex-track-kotlin" +include(":flextrack") +include(":sample")