diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e864786..41bbbaa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,26 +1,60 @@ -name: Build +name: CI on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: [ "main", "feature/**" ] + paths-ignore: + - "**.md" + - "docs/**" -jobs: - build: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + android: runs-on: ubuntu-latest + timeout-minutes: 25 steps: - - uses: actions/checkout@v3 - - name: set up JDK 17 - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - name: set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: '17' + java-version: '21' distribution: 'temurin' - cache: gradle + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + with: + validate-wrappers: true - - name: Grant execute permission for gradlew - run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build \ No newline at end of file + run: ./gradlew build + + ios: + runs-on: macos-15 + timeout-minutes: 35 + + env: + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx3g -Dkotlin.daemon.jvmargs=-Xmx3g + + steps: + - uses: actions/checkout@v4 + - name: set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Cache Kotlin/Native toolchain + uses: actions/cache@v4 + with: + path: ~/.konan + key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml') }} + restore-keys: konan-${{ runner.os }}- + + - name: Build and test with Gradle + run: ./gradlew :updraft-core:iosSimulatorArm64Test :updraft-ui-compose:iosSimulatorArm64Test :updraft-core:assembleUpdraftCoreXCFramework + - name: Build iOS sample app + run: xcodebuild -project sample/iosApp/iosApp.xcodeproj -scheme iosApp -sdk iphonesimulator -configuration Debug build CODE_SIGNING_ALLOWED=NO diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 586d309..b28d2d7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,44 +4,66 @@ on: push: branches: [ production ] +concurrency: + group: publish + cancel-in-progress: false + jobs: publish: - runs-on: ubuntu-latest + runs-on: macos-15 + timeout-minutes: 60 + environment: maven-central + permissions: + contents: write + env: + GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx3g -Dkotlin.daemon.jvmargs=-Xmx3g steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: set up JDK 21 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '21' distribution: 'temurin' - cache: gradle + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v4 + with: + validate-wrappers: true + - name: Cache Kotlin/Native toolchain + uses: actions/cache@v4 + with: + path: ~/.konan + key: konan-${{ runner.os }}-${{ hashFiles('gradle/libs.versions.toml') }} + restore-keys: konan-${{ runner.os }}- + + - name: Extract version from gradle.properties + id: get_version + run: echo "version=$(grep VERSION_NAME updraft-sdk/gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: Fail if version already released + run: | + if git ls-remote --tags origin "refs/tags/${{ steps.get_version.outputs.version }}" | grep -q .; then + echo "::error::Version ${{ steps.get_version.outputs.version }} is already tagged — bump VERSION_NAME before publishing." + exit 1 + fi + + - name: Verify (build + all tests, both platforms) + run: ./gradlew build iosSimulatorArm64Test - name: Publish to Maven Central Portal - run: ./gradlew :updraft-sdk:publish --no-configuration-cache + run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache env: ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }} ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} - - name: Extract version from gradle.properties - id: get_version - run: echo "version=$(grep VERSION_NAME updraft-sdk/gradle.properties | cut -d'=' -f2)" >> $GITHUB_OUTPUT - - name: Create GitHub Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.get_version.outputs.version }} - release_name: ${{ steps.get_version.outputs.version }} + name: ${{ steps.get_version.outputs.version }} body: | Automated release ${{ steps.get_version.outputs.version }} - + Published to: - Maven Central - draft: false - prerelease: false diff --git a/README.md b/README.md index e9bde65..49751f5 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ ![Updraft: Mobile App Distribution](updraft.png) [![Maven Central](https://maven-badges.sml.io/sonatype-central/com.appswithlove.updraft/updraft-sdk/badge.svg)](https://maven-badges.sml.io/sonatype-central/com.appswithlove.updraft/updraft-sdk) -[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/appswithlove/updraft-sdk-ios/master/LICENSE) +[![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](LICENSE) [![Bluesky](https://img.shields.io/badge/Bluesky-@appswithlove.bsky.social-blue.svg?style=flat)]([https://twitter.com/GetUpdraft](https://bsky.app/profile/appswithlove.bsky.social)) # Updraft SDK -Updraft SDK for Android +Updraft SDK for Android & iOS — built with Kotlin Multiplatform and Compose Multiplatform. Updraft is a super easy app delivery tool that allows you to simply and quickly distribute your app. It's super useful during beta-testing or if you want to deliver an app without going through the app store review processes. Your users get a link and are guided through the installation process with in a comprehensive web-app. Updraft works with Android and iOS apps and easily integrates with your IDE. -The SDK adds additional features to apps that are delivered with Updraft: Auto-update for your distributed apps and most importantly the collection of user feedback. +The SDK adds additional features to apps that are delivered with Updraft: Auto-update for your distributed apps and most importantly the collection of user feedback (shake or screenshot to report, annotate, send). + +One codebase serves every kind of app: native Android (Views or Compose), Kotlin/Compose Multiplatform, and pure-Swift iOS apps via an XCFramework. This repository was formerly `updraft-sdk-android`; since 2.0.0 it is the single home of the Updraft SDK for both platforms and supersedes [`updraft-sdk-ios`](https://github.com/appswithlove/updraft-sdk-ios). Updraft is built by App Agencies [Apps with love](https://appswithlove.com/) and [Moqod](https://moqod.com/). Learn more at [getupdraft.com](https://getupdraft.com/) or follow the latest news on [twitter](https://twitter.com/GetUpdraft). @@ -18,48 +20,112 @@ Updraft is built by App Agencies [Apps with love](https://appswithlove.com/) and ## Requirements - minSdkVersion >=23 +- iOS 14.0+ (for `updraft-core` / `updraft-ui-compose` iOS targets) + +### Kotlin version compatibility + +The SDK is built with Kotlin 2.2 and Compose Multiplatform 1.9. What your project needs depends on how you consume it: + +| Your app | Required Kotlin | +| --- | --- | +| Java-only Android app | none — Kotlin metadata is not read at runtime | +| Kotlin Android app | **Kotlin ≥ 2.1** (the Kotlin compiler reads metadata up to one minor version ahead) | +| KMP / Compose Multiplatform app | **Kotlin ≥ 2.2** (klib consumption requires a matching compiler) | +| Swift app via `UpdraftCore.xcframework` | none — compiled binary, no Kotlin toolchain involved | + +If your Kotlin version is too old, the build fails at compile time (never at runtime) with one of these: + +``` +Module 'updraft-core' was compiled with an incompatible version of Kotlin. +The binary version of its metadata is 2.2.0, expected version is 2.1.0. +``` + +``` +KLIB resolver: Could not find "updraft-core" ... compiled with a newer Kotlin compiler +``` + +**Fix:** upgrade your project's Kotlin (and for CMP apps, Compose Multiplatform) to the versions above — or stay on Updraft SDK 1.x until you can. ## Installation -Add the updraft-sdk dependency: +Updraft 2.0.0 ships as three Kotlin Multiplatform artifacts. Pick the one that matches your app: + +| Artifact | Use case | +| --- | --- | +| `updraft-sdk` | Android (Views or Compose) apps that want everything out of the box: auto-update, feedback, and the built-in Compose UI, wired up automatically. | +| `updraft-core` | Logic only, no UI. Common for KMP apps with their own native UI per platform, or size-sensitive Android Views apps that don't want to pull in Compose. | +| `updraft-core` + `updraft-ui-compose` | Compose Multiplatform (CMP) apps that want the built-in feedback UI but want to host it themselves inside their own Compose tree. | ```kotlin // libs.versions.toml [versions] -updraft-sdk = "1.1.2" +updraft-sdk = "2.0.0" [libraries] -updraft-sdk = { module = "com.appswithlove.updraft:updraft-sdk", version.ref = "updraft-sdk" } +updraft-sdk = { module = "com.appswithlove.updraft:updraft-sdk", version.ref = "updraft-sdk" } +updraft-core = { module = "com.appswithlove.updraft:updraft-core", version.ref = "updraft-sdk" } +updraft-ui-compose = { module = "com.appswithlove.updraft:updraft-ui-compose", version.ref = "updraft-sdk" } ``` ```kotlin -// build.gradle.kts +// build.gradle.kts (Android all-in-one) dependencies { implementation(libs.updraft.sdk) } ``` +```kotlin +// build.gradle.kts (KMP commonMain, logic only) +kotlin { + sourceSets { + commonMain.dependencies { + implementation(libs.updraft.core) + } + } +} +``` + +```kotlin +// build.gradle.kts (Compose Multiplatform, own UI hosting) +kotlin { + sourceSets { + commonMain.dependencies { + implementation(libs.updraft.core) + implementation(libs.updraft.ui.compose) + } + } +} +``` + +`updraft-core` and `updraft-ui-compose` publish `iosArm64`/`iosSimulatorArm64`/`iosX64` targets alongside `androidTarget`, so the same dependency works from a KMP or Compose Multiplatform `commonMain` source set on both platforms. Pure-Swift consumers that don't want Kotlin/Compose tooling use the `UpdraftCore.xcframework` instead — see [Swift integration](#swift-integration) below. `updraft-sdk` (the all-in-one artifact) is Android-only. + +`updraft-sdk-ios` is superseded by this SDK once 2.0.0 ships. Archiving that repo and adding a final README banner there are release-time actions, tracked in [`docs/kmp-migration-m1-status.md`](docs/kmp-migration-m1-status.md). + ## Setup +`updraft-sdk` requires no manual initialization beyond starting the SDK. Auto-update alerts, the feedback shake-to-report flow, and the feedback screen are all wired up for you via `androidx.startup`. + ```kotlin -override fun onCreate() { - super.onCreate() - val settings = Settings().apply { - appKey = APP_KEY - sdkKey = SDK_KEY - baseUrl = Settings.BASE_URL_STAGING // Optional base url for updraft - logLevel = Settings.LOG_LEVEL_DEBUG // Optional log level - showFeedbackAlert = true // Optional set if should show start alert - feedbackEnabled = true // force disabling feedback if needed +class App : Application() { + override fun onCreate() { + super.onCreate() + Updraft.start( + UpdraftSettings( + appKey = APP_KEY, + sdkKey = SDK_KEY, + // baseUrl defaults to the Updraft production API; override only for self-hosted instances + logLevel = LogLevel.Debug, // Optional log level + showFeedbackAlert = true, // Optional set if should show start alert + feedbackEnabled = true, // force disabling feedback if needed + ), + ) } - - Updraft.initialize(this, settings) - Updraft.getInstance()?.start() } ``` + ### Parameters -- YOUR_SDK_KEY: Your sdk key obtained on [Updraft](https://getupdraft.com) -- YOUR_APP_KEY: You app key obtained on [Updraft](https://getupdraft.com) +- appKey: Your app key obtained on [Updraft](https://getupdraft.com) +- sdkKey: Your sdk key obtained on [Updraft](https://getupdraft.com) ## AutoUpdate Auto Update functionality can be enabled/disabled on [getupdraft.com](https://getupdraft.com/) in your app edit menu. @@ -80,23 +146,210 @@ A prompt is shown to the user to inform him of the change of state of the feedba If enabled, the user is explained how he can give feedback. User can take a screenshot to give a feedback. -## Advanced setup: Logging +### Navigation stack + +Each feedback upload includes the app's navigation stack, captured at the moment +feedback is triggered (e.g. on shake). By default the SDK reports the Android +activity stack or the iOS view controller chain. Single-activity apps (Compose, +Navigation Component) should plug in their navigation library via +`Updraft.navigationStackProvider` — return screen names ordered root to top: + +**Jetpack Compose Navigation** + +```kotlin +val navController = rememberNavController() +LaunchedEffect(navController) { + Updraft.navigationStackProvider = { + listOfNotNull(navController.currentBackStackEntry?.destination?.route) + } +} +``` + +Or track the full back stack yourself with a destination listener: + +```kotlin +val breadcrumbs = mutableListOf() +navController.addOnDestinationChangedListener { _, destination, _ -> + destination.route?.let { route -> + breadcrumbs.remove(route) + breadcrumbs.add(route) + } +} +Updraft.navigationStackProvider = { breadcrumbs.toList() } +``` + +**Fragments (Navigation Component)** + +```kotlin +Updraft.navigationStackProvider = { + navController.currentBackStack.value.mapNotNull { it.destination.label?.toString() } +} +``` + +**SwiftUI (iOS)** + +```swift +UpdraftKt.navigationStackProvider = { ["Home", "Settings"] } // from your router state +``` + +Setting the provider to `null` restores the platform default. Updraft's own +screens are always excluded. + +The whole feature is optional: to not send any navigation information at all +(e.g. for privacy reasons), disable it in the settings — the provider and the +platform default are then never invoked: + +```kotlin +UpdraftSettings(appKey = ..., sdkKey = ..., sendNavigationStack = false) +``` + +## Advanced setup: Logging To check if data is send properly to Updraft and also see some additional SDK log data in the console, you can set different log levels. -To change the log level, add the following line before starting the SDK: +Pass the desired level when constructing `UpdraftSettings`: ```kotlin -settings.setLogLevel(Settings.LOG_LEVEL_DEBUG); +UpdraftSettings( + appKey = APP_KEY, + sdkKey = SDK_KEY, + logLevel = LogLevel.Debug, +) ``` +`LogLevel` is one of `None`, `Error`, `Debug`. Default level: LogLevel.Error => Only warnings and errors will be printed. + +## Migrating from 1.x + +Version 2.0.0 rebuilds the SDK on Kotlin Multiplatform. `updraft-sdk` is still a drop-in Android dependency and behaves the same at runtime, but the setup API changed. Before migrating, check the [Kotlin version compatibility](#kotlin-version-compatibility) table — projects on Kotlin < 2.1 should stay on 1.x until they upgrade. -Default level: LOG_LEVEL_ERROR => Only warnings and errors will be printed. +| 1.x | 2.0.0 | +| --- | --- | +| `Settings().apply { appKey = ...; sdkKey = ... }` | `UpdraftSettings(appKey = ..., sdkKey = ..., ...)` — a constructor with named parameters instead of a mutable builder object | +| `Settings.LOG_LEVEL_DEBUG` / `LOG_LEVEL_ERROR` | `LogLevel.Debug` / `LogLevel.Error` / `LogLevel.None` | +| `Updraft.initialize(this, settings)` followed by `Updraft.getInstance()?.start()` | `Updraft.start(settings)` — a single call, no `initialize`/`getInstance()` step | +| `settings.isStoreRelease` | `UpdraftSettings(..., storeRelease = ...)` | +| `ScreenshotProvider` (custom screenshot capture) | Not supported yet in 2.0.0. Feedback screenshots are captured automatically; a custom-screenshot hook is planned for a follow-up release. | + +Other things to know: +- Context is no longer passed manually — `updraft-sdk` picks it up via `androidx.startup`, so there's no `Application` context argument to `start()`. +- `updraft-sdk` now pulls in the Compose runtime to render its feedback UI. For a release build with R8/minification this adds roughly 2 MB to a non-Compose app (already-Compose apps see close to zero extra size, since the runtime is shared). If that's not acceptable for a size-sensitive Views app, depend on `updraft-core` directly instead (see below) — it's roughly 200–400 KB and has no UI dependency at all. + +## KMP / Compose Multiplatform + +### `updraft-core` only (bring your own UI) + +Apps with their own native UI per platform (or Views apps avoiding the Compose dependency) depend on `updraft-core` in `commonMain` and hook into the feedback flow directly: + +```kotlin +Updraft.start(UpdraftSettings(appKey = APP_KEY, sdkKey = SDK_KEY)) + +Updraft.setFeedbackUiPresenter { screenshotPng -> + // Show your own feedback UI, e.g. navigate to a screen or present a sheet. +} + +// From your own UI, once the user submits feedback: +Updraft.sendFeedback(screenshot, type, description, email) + .collect { progress -> /* upload progress, 0.0..1.0 */ } + +// Once your feedback UI closes (submitted, cancelled, or dismissed), you MUST call this to +// re-arm shake-to-report detection. Without it, shaking the device again won't trigger feedback. +Updraft.onFeedbackUiClosed() +``` + +Subscribe to `Updraft.events: SharedFlow` to react to update prompts, feedback hints, and errors in your own UI layer. + +### `updraft-core` + `updraft-ui-compose` (embed the built-in UI) + +Compose Multiplatform apps that want Updraft's built-in feedback UI, but hosted inside their own Compose tree, add `updraft-ui-compose` and use `UpdraftEventHost` plus `FeedbackScreen`: + +```kotlin +Updraft.start(UpdraftSettings(appKey = APP_KEY, sdkKey = SDK_KEY)) + +@Composable +fun App() { + // Renders update/feedback-hint dialogs as an overlay; call anywhere in your Compose tree. + UpdraftEventHost( + events = Updraft.events, + onFeedbackRequested = { + // Obtain the screenshot captured for this request, then navigate to your feedback screen/route. + val screenshotPng = Updraft.takePendingScreenshot() + navigateToFeedback(screenshotPng) + }, + ) + + // your app content +} + +@Composable +fun FeedbackRoute(screenshotPng: ByteArray?, onClose: () -> Unit) { + FeedbackScreen( + screenshotPng = screenshotPng, + onClose = { + onClose() + // Re-arms shake-to-report detection. + Updraft.onFeedbackUiClosed() + }, + ) +} +``` + +### iOS + +Both setups above work unchanged in `iosMain` — `Updraft.start`, `Updraft.events`, `Updraft.setFeedbackUiPresenter`, `Updraft.sendFeedback`, etc. are the same `commonMain` API on iOS as on Android. There's no iOS-specific initialization step; call `Updraft.start(...)` once from your shared Kotlin entry point (e.g. the function your `iOSApp.swift` calls on launch). + +Compose Multiplatform apps that added `updraft-ui-compose` get the built-in feedback UI wired up for free on iOS via `UpdraftIos.autoWire()` — it presents the update/feedback dialogs and the feedback screen on top of the current key window, no `UpdraftEventHost` needed: + +```kotlin +// commonMain or iosMain, called once from your app's iOS entry point +fun startUpdraft() { + Updraft.start(UpdraftSettings(appKey = APP_KEY, sdkKey = SDK_KEY)) + UpdraftIos.autoWire() +} +``` + +Shake detection uses `CMMotionManager` (accelerometer), which needs no `Info.plist` permission entry. + +### Swift integration + +`updraft-core` builds an `UpdraftCore.xcframework` for pure-Swift consumers that don't want to pull in Kotlin/Compose tooling: + +``` +./gradlew :updraft-core:assembleUpdraftCoreXCFramework +``` + +The framework is written to `updraft-core/build/XCFrameworks/release/UpdraftCore.xcframework`. Drag it into an Xcode project or wrap it as an SPM binary target; how it's distributed (e.g. published alongside a release, hosted as a zip) is a release-time decision, out of scope for M2. + +`UpdraftCore.xcframework` exposes the same `commonMain` API as above — `Updraft`, `UpdraftSettings`, `Updraft.events`, etc. — callable from Swift: + +```swift +import UpdraftCore + +Updraft.shared.start( + settings: UpdraftSettings( + appKey: APP_KEY, + sdkKey: SDK_KEY, + baseUrl: UpdraftSettings.companion.BASE_URL_PROD, + logLevel: .error, + showFeedbackAlert: true, + feedbackEnabled: true, + storeRelease: false + ) +) +``` + +Kotlin default parameter values aren't exposed to the generated Objective-C/Swift header, so every `UpdraftSettings` argument must be passed explicitly from Swift (unlike Kotlin callers, which can rely on the defaults shown in [Setup](#setup)). + +Since this framework only wraps `updraft-core`, it does not include the built-in Compose feedback UI (`updraft-ui-compose`, incl. `UpdraftFeedbackViewController`) — a pure-Swift, non-Compose app builds its own feedback screen and drives it via `Updraft.setFeedbackUiPresenter` / `Updraft.sendFeedback`, the same way an `updraft-core`-only Android/KMP app does. `UpdraftFeedbackViewController` and `UpdraftIos.autoWire()` are only reachable from a Kotlin/Compose Multiplatform app's own shared Kotlin code, as in the [`iOS` section](#ios) above. ## Local Development In order to locally develop this plugin, the sample project can be used for easy testing. Additionally, the gradle task `publishToMavenLocal` allows to install the current version to Maven Local. +### Strings / Loco + +UI strings live in `updraft-ui-compose/src/commonMain/composeResources/values*/strings.xml` (en/de) and are shared by Android and iOS. They are managed on [Loco](https://localise.biz); `./gradlew :updraft-ui-compose:updateLoco` re-fetches them into the compose-resources directory (same `strings.xml` format as classic Android resources). The task needs `updraft.locoApiKey=` in `local.properties` and **overwrites local edits** — string changes must be made in Loco first, then pulled. Adding a new key: add it to the Loco project (en + de), run `updateLoco`, reference it via `Res.string.`. + ## Release -In order to release a new version of this plugin, create a new release on GitHub and the [pipeline](.github/workflows/publish.yml) will automatically publish the new version to Maven Central. +Pushing to the `production` branch triggers the [publish workflow](.github/workflows/publish.yml), which publishes `updraft-core`, `updraft-ui-compose`, and `updraft-sdk` to Maven Central. diff --git a/app/build.gradle.kts b/app/build.gradle.kts deleted file mode 100644 index 61f7004..0000000 --- a/app/build.gradle.kts +++ /dev/null @@ -1,76 +0,0 @@ -import org.gradle.kotlin.dsl.withType -import org.jetbrains.kotlin.gradle.dsl.JvmTarget -import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile - -plugins { - alias(libs.plugins.android.application) - alias(libs.plugins.kotlin.android) - alias(libs.plugins.updraft) -} - -android { - namespace = "com.appswithlove.updraftsdk" - compileSdk = 36 - - defaultConfig { - applicationId = "com.appswithlove.updraftsdk" - minSdk = 23 - targetSdk = 36 - versionCode = 5 - versionName = "1.4" - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - } - - signingConfigs { - create("release") { - storeFile = file("updraft_test.jks") - storePassword = "appswithlove" - keyAlias = "release" - keyPassword = "appswithlove" - } - } - - buildTypes { - release { - signingConfig = signingConfigs.getByName("release") - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - tasks.withType().configureEach { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) - freeCompilerArgs.add("-opt-in=kotlin.RequiresOptIn") - } - } - - buildFeatures { - viewBinding = true - buildConfig = true - } -} - -val updraftUploadUrl: String = findProperty("updraft_uploadUrl") as? String ?: "" -updraft { - urls = mapOf("Release" to listOf(updraftUploadUrl)) -} - -dependencies { - implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar")))) - implementation(project(":updraft-sdk")) - implementation(libs.appcompat) - implementation(libs.material) - implementation(libs.constraintlayout) - implementation(libs.core.ktx) - implementation(libs.lifecycle.viewmodel.ktx) - implementation(libs.kotlin.stdlib.jdk7) -} diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png deleted file mode 100644 index ca1666b..0000000 Binary files a/app/src/main/ic_launcher-playstore.png and /dev/null differ diff --git a/app/src/main/java/com/appswithlove/updraftsdk/App.kt b/app/src/main/java/com/appswithlove/updraftsdk/App.kt deleted file mode 100644 index ffd4b23..0000000 --- a/app/src/main/java/com/appswithlove/updraftsdk/App.kt +++ /dev/null @@ -1,25 +0,0 @@ -package com.appswithlove.updraftsdk - -import android.app.Application -import com.appswithlove.updraft.Settings -import com.appswithlove.updraft.Updraft - -/** - * Created by satori on 3/27/18. - */ -class App : Application() { - override fun onCreate() { - super.onCreate() - val settings = Settings().apply { - appKey = "" //APP_KEY - sdkKey = "" // SDK_KEY - isStoreRelease = false - logLevel = Settings.LOG_LEVEL_DEBUG - showFeedbackAlert = false - feedbackEnabled = true - } - - Updraft.initialize(this, settings) - Updraft.getInstance()?.start() - } -} \ No newline at end of file diff --git a/app/src/main/java/com/appswithlove/updraftsdk/MainActivity.kt b/app/src/main/java/com/appswithlove/updraftsdk/MainActivity.kt deleted file mode 100644 index acbfd86..0000000 --- a/app/src/main/java/com/appswithlove/updraftsdk/MainActivity.kt +++ /dev/null @@ -1,31 +0,0 @@ -package com.appswithlove.updraftsdk - -import android.content.Intent -import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity -import androidx.core.view.WindowInsetsControllerCompat -import com.appswithlove.updraftsdk.databinding.ActivityMainBinding - -class MainActivity : AppCompatActivity() { - - private var _binding: ActivityMainBinding? = null - private val binding get() = _binding!! - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - - _binding = ActivityMainBinding.inflate(layoutInflater) - setContentView(binding.root) - - WindowInsetsControllerCompat(window, binding.root).isAppearanceLightStatusBars = true - WindowInsetsControllerCompat(window, binding.root).isAppearanceLightNavigationBars = true - } - - override fun onStart() { - super.onStart() - - binding.button.setOnClickListener { - startActivity(Intent(this, MainActivity::class.java)) - } - } -} diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 747664f..0000000 --- a/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - -