Panagiotis Triantafyllou

migrate to maven central, db fixes for android 15

apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
android.buildFeatures.buildConfig = true
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.5.4'
PUBLISH_VERSION = '4.5.5.5'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle"
android {
compileSdkVersion 35
buildToolsVersion "35.0.0"
useLibrary 'org.apache.http.legacy'
compileSdkVersion 33
buildToolsVersion "33.0.2"
publishing {
// Configure all components to be published
singleVariant('release') {
// Publish the release variant with sources
withSourcesJar()
}
}
defaultConfig {
minSdkVersion 23
targetSdkVersion 33
targetSdkVersion 35
consumerProguardFiles 'proguard-rules.pro'
vectorDrawables.useSupportLibrary = true
}
splits {
abi {
......@@ -29,11 +42,13 @@ android {
lintOptions {
abortOnError false
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
buildTypes {
release {
minifyEnabled false
......@@ -41,7 +56,7 @@ android {
}
}
useLibrary 'org.apache.http.legacy'
namespace "ly.warp.sdk"
}
dependencies {
......@@ -75,39 +90,22 @@ dependencies {
api 'com.huawei.hms:push:6.10.0.300'
api 'com.huawei.hms:ads-identifier:3.4.62.300'
//------------------------------ SQLCipher -----------------------------//
api 'net.zetetic:android-database-sqlcipher:4.5.2'
api 'androidx.sqlite:sqlite:2.3.1'
//------------------------------ SQLite (Standard Android) -----------------------------//
api 'androidx.sqlite:sqlite:2.5.2'
}
// In every export please update the version number
task deleteJarLibrary(type: Delete) {
tasks.register('deleteJarLibrary', Delete) {
delete 'jar/warply_android_sdk_v4.5.0.jar'
}
//from('build/intermediates/compile_library_classes/release/')
//Old version
// Gradle Tasks -> warply_android_sdk -> Tasks -> other -> createJarLibrary
//task createJarLibrary(type: Copy) {
// from fileTree('build/intermediates/bundles/release/')
// into('jar/')
// include('classes.jar')
// rename('classes.jar', 'warply_android_sdk_v4.4.2.jar')
//}
// New version
// Gradle -> warplyDemo -> libraries -> warply_android_sdk -> Run Configurations -> assembleRelease
// When finished it copies the .jar into
// warply_android_sdk -> build -> intermediates -> full_jar -> release/debug -> full.jar
// 24 - Jan - 2022
// Gradle -> warplyDemo -> libraries -> warply_android_sdk -> Tasks -> build -> build
// When finished it copies the .aar into
// warply_android_sdk -> build -> outputs -> aar -> warply_android_sdk-release.aar
task createJarLibrary(type: Jar, dependsOn: 'assembleRelease') {
from fileTree('build/intermediates/bundles/release/')
tasks.register('createJarLibrary', Jar) {
dependsOn('assembleRelease')
from(fileTree('build/intermediates/aar/release/'))
destinationDirectory = file('jar')
archiveFileName = "warply_android_sdk_v${PUBLISH_VERSION}.jar"
}
createJarLibrary.dependsOn(deleteJarLibrary, build)
tasks.named('createJarLibrary') {
dependsOn('deleteJarLibrary', 'build')
}
......