Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdk: update android api level to 34 #6

Merged
merged 16 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'
cache: gradle

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ gen/

# Local configuration file (sdk path, etc)
local.properties
gradle.properties

# Windows thumbnail db
Thumbs.db
Expand Down
40 changes: 24 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.appswithlove.updraft'
plugins {
alias libs.plugins.androidApplication
alias libs.plugins.kotlinAndroid
alias libs.plugins.updraft
}

android {
compileSdkVersion 33
namespace "com.appswithlove.updraftsdk"

compileSdk 34
defaultConfig {
applicationId "com.appswithlove.updraftsdk"
minSdkVersion 19
targetSdkVersion 33
versionCode 4
versionName "1.3"
targetSdkVersion 34
versionCode 5
versionName "1.4"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
}
Expand All @@ -31,31 +35,35 @@ android {
}
}


compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}

buildFeatures {
viewBinding true
buildConfig = true
}

updraft {
urls['Release'] = "${updraft_uploadUrl}"
urls['Release'] = project.hasProperty('updraft_uploadUrl') ? "${updraft_uploadUrl}" : ""
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':updraft-sdk')
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation "com.google.android.material:material:1.9.0"
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.core:core-ktx:1.10.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
implementation 'com.android.support:multidex:1.0.3'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation libs.appcompat
implementation libs.material
implementation libs.constraintlayout
implementation libs.core.ktx
implementation libs.lifecycle.viewmodel.ktx
implementation libs.multidex
implementation libs.kotlin.stdlib.jdk7
}
repositories {
mavenCentral()
Expand Down
1 change: 1 addition & 0 deletions app/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
updraft_uploadUrl=https://google.com
6 changes: 2 additions & 4 deletions app/src/main/java/com/appswithlove/updraftsdk/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package com.appswithlove.updraftsdk
import android.app.Application
import com.appswithlove.updraft.Settings
import com.appswithlove.updraft.Updraft
import com.appswithlove.updraftsdk.Keys.APP_KEY
import com.appswithlove.updraftsdk.Keys.SDK_KEY

/**
* Created by satori on 3/27/18.
Expand All @@ -13,8 +11,8 @@ class App : Application() {
override fun onCreate() {
super.onCreate()
val settings = Settings().apply {
appKey = APP_KEY
sdkKey = SDK_KEY
appKey = "" //APP_KEY
sdkKey = "" // SDK_KEY
isStoreRelease = false
logLevel = Settings.LOG_LEVEL_DEBUG
showFeedbackAlert = false
Expand Down
24 changes: 14 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.8.10'

repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.appswithlove.updraft:updraft:2.2.2'
classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.7.20'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.appswithlove.loco:loco:0.3.0'
classpath libs.tools.build.gradle
classpath libs.updraft
classpath libs.dokka.gradle.plugin
classpath libs.android.maven.gradle.plugin
classpath libs.kotlin.gradle.plugin
classpath libs.loco
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id "com.vanniktech.maven.publish" version "0.24.0"
id 'com.github.kt3k.coveralls' version '2.4.0'
alias libs.plugins.vanniktechMavenPublish
alias libs.plugins.coveralls
id 'signing'

alias libs.plugins.androidApplication apply false
alias libs.plugins.androidLibrary apply false
alias libs.plugins.updraft apply false
alias libs.plugins.kotlinAndroid apply false
alias libs.plugins.loco apply false
}

allprojects {
Expand Down
21 changes: 21 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
57 changes: 57 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[versions]
androidMavenGradlePlugin = "2.1"
appcompat = "1.6.1"
constraintlayout = "2.1.4"
coreKtx = "1.7.0"
dokkaGradlePlugin = "1.7.20"
freedrawview = "1.1.2"
gradle = "8.2.2"
ink = "1.0.0"
lifecycleExtensions = "2.0.0"
lifecycleViewmodelKtx = "2.6.1"
loco = "0.3.1"
loggingInterceptor = "3.10.0"
material = "1.9.0"
multidex = "1.0.3"
retrofit = "2.4.0"
rxandroid = "2.0.2"
rxjava = "2.1.12"
updraft = "2.2.4"
kotlin = "1.9.23"
vanniktechMavenPublish = "0.24.0"
coveralls = "2.4.0"

[libraries]
adapter-rxjava2 = { module = "com.squareup.retrofit2:adapter-rxjava2", version.ref = "retrofit" }
android-maven-gradle-plugin = { module = "com.github.dcendents:android-maven-gradle-plugin", version.ref = "androidMavenGradlePlugin" }
appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "constraintlayout" }
converter-gson = { module = "com.squareup.retrofit2:converter-gson", version.ref = "retrofit" }
core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokkaGradlePlugin" }
freedrawview = { module = "com.rm:freedrawview", version.ref = "freedrawview" }
ink = { module = "com.simplify:ink", version.ref = "ink" }
kotlin-stdlib-jdk7 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk7", version.ref = "kotlin" }
lifecycle-compiler = { module = "androidx.lifecycle:lifecycle-compiler", version.ref = "lifecycleExtensions" }
lifecycle-extensions = { module = "androidx.lifecycle:lifecycle-extensions", version.ref = "lifecycleExtensions" }
lifecycle-runtime = { module = "androidx.lifecycle:lifecycle-runtime", version.ref = "lifecycleExtensions" }
lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
logging-interceptor = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "loggingInterceptor" }
material = { module = "com.google.android.material:material", version.ref = "material" }
multidex = { module = "com.android.support:multidex", version.ref = "multidex" }
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
rxandroid = { module = "io.reactivex.rxjava2:rxandroid", version.ref = "rxandroid" }
rxjava = { module = "io.reactivex.rxjava2:rxjava", version.ref = "rxjava" }
tools-build-gradle = { module = "com.android.tools.build:gradle", version.ref = "gradle" }
kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
loco = { module = "com.appswithlove.loco:loco", version = "0.3.1" }
updraft = { module = "com.appswithlove.updraft:updraft", version.ref = "updraft" }

[plugins]
androidApplication = { id = "com.android.application", version.ref = "gradle" }
androidLibrary = { id = "com.android.library", version.ref = "gradle" }
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
updraft = { id = "com.appswithlove.updraft", version.ref = "updraft" }
vanniktechMavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }
coveralls = { id = "com.github.kt3k.coveralls", version.ref = "coveralls" }
loco = { id = "com.appswithlove.loco", version.ref = "loco" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Nov 23 11:31:29 CET 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
19 changes: 19 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
pluginManagement {
repositories {
google()
gradlePluginPortal()
mavenCentral()
maven { url 'https://maven.scijava.org/content/repositories/public/' }
}
}

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://maven.scijava.org/content/repositories/public/' }
}
}

rootProject.name = "updraft-sdk-android"
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include ':app', ':updraft-sdk'
63 changes: 37 additions & 26 deletions updraft-sdk/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
alias libs.plugins.androidLibrary
alias libs.plugins.kotlinAndroid
alias libs.plugins.loco
alias libs.plugins.vanniktechMavenPublish
id 'maven-publish'
id 'base'
id 'com.appswithlove.loco'
id 'com.vanniktech.maven.publish'
}


group GROUP
version VERSION_NAME

android {
compileSdkVersion 33
namespace "com.appswithlove.updraft"
compileSdk 34

defaultConfig {
minSdkVersion 19
targetSdkVersion 33
targetSdkVersion 34

testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

multiDexEnabled true
}

buildTypes {
Expand All @@ -28,35 +28,46 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

buildFeatures {
buildConfig = true
}

compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = "1.8"
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

api 'androidx.appcompat:appcompat:1.0.0'
implementation "com.google.android.material:material:1.4.0"
implementation libs.appcompat
implementation libs.material

implementation libs.retrofit
implementation libs.converter.gson
implementation libs.adapter.rxjava2
implementation libs.logging.interceptor
implementation libs.rxjava
implementation libs.rxandroid

api 'com.squareup.retrofit2:retrofit:2.4.0'
api 'com.squareup.retrofit2:converter-gson:2.4.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
api 'com.squareup.okhttp3:logging-interceptor:3.10.0'
api "io.reactivex.rxjava2:rxjava:2.1.12"
api 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation libs.ink

api 'com.simplify:ink:1.0.0'
implementation libs.lifecycle.extensions
implementation libs.lifecycle.runtime
annotationProcessor libs.lifecycle.compiler

api 'androidx.lifecycle:lifecycle-extensions:2.0.0'
api 'androidx.lifecycle:lifecycle-runtime:2.0.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
implementation libs.freedrawview
implementation libs.core.ktx
implementation libs.lifecycle.viewmodel.ktx
implementation libs.kotlin.stdlib.jdk7

implementation 'com.rm:freedrawview:1.1.2'
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation libs.multidex
}

import com.vanniktech.maven.publish.SonatypeHost
Expand Down
Loading
Loading