Panagiotis Triantafyllou

new gradle fixes

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="17" />
<bytecodeTargetLevel target="21" />
</component>
</project>
\ No newline at end of file
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DesignSurface">
<option name="filePathToZoomLevelMap">
......@@ -183,7 +184,7 @@
</map>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -47,6 +47,14 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace "warp.ly.android_sdk"
packaging {
jniLibs {
useLegacyPackaging true
}
}
}
dependencies {
......
......@@ -16,7 +16,6 @@
android:name="warp.ly.android_sdk.WarplyAndroidSDKApplication"
android:allowBackup="false"
android:exported="true"
android:extractNativeLibs="true"
android:fullBackupContent="false"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
......
......@@ -8,9 +8,9 @@ buildscript {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath 'com.android.tools.build:gradle:8.8.0'
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.huawei.agconnect:agcp:1.7.2.300'
classpath 'com.huawei.agconnect:agcp:1.9.1.300'
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
// NOTE: Do not place your application dependencies here; they belong
......
#Fri Jul 26 17:08:44 EEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......
......@@ -32,12 +32,12 @@ afterEvaluate {
// Two artifacts, the `aar` (or `jar`) and the sources
if (project.plugins.findPlugin("com.android.library")) {
from components.release
from(project.components.findByName("release"))
} else {
from components.java
}
artifact androidSourcesJar
// Sources are now handled by the android block's singleVariant
// artifact javadocJar
// Mostly self-explanatory metadata
......
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
android.buildFeatures.buildConfig = true
ext {
PUBLISH_GROUP_ID = 'ly.warp'
PUBLISH_VERSION = '4.5.5.4r43'
PUBLISH_VERSION = '4.5.5.4r46'
PUBLISH_ARTIFACT_ID = 'warply-android-sdk'
}
......@@ -14,6 +17,14 @@ android {
useLibrary 'org.apache.http.legacy'
publishing {
// Configure all components to be published
singleVariant('release') {
// Publish the release variant with sources
withSourcesJar()
}
}
defaultConfig {
minSdkVersion 23
targetSdkVersion 34
......@@ -44,6 +55,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace "ly.warp.sdk"
}
dependencies {
......@@ -114,33 +127,17 @@ dependencies {
}
// 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')
}
......