diff --git a/build.gradle b/build.gradle index 3fee097..7030ebe 100644 --- a/build.gradle +++ b/build.gradle @@ -6,14 +6,14 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:8.3.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" + id("io.github.gradle-nexus.publish-plugin") version "1.3.0" id("maven-publish") } @@ -24,8 +24,8 @@ allprojects { } } -task clean(type: Delete) { - delete rootProject.buildDir +tasks.register('clean', Delete) { + delete rootProject.getLayout().getBuildDirectory() } nexusPublishing { diff --git a/examples/build.gradle b/examples/build.gradle index 5f6c523..1138af8 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -5,10 +5,10 @@ repositories { } android { - compileSdkVersion 33 + compileSdk 34 defaultConfig { minSdkVersion 15 - targetSdkVersion 33 + targetSdkVersion 34 versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -19,11 +19,12 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + namespace 'com.transloadit.examples' } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.android.support.constraint:constraint-layout:2.0.4' implementation 'com.transloadit.sdk:transloadit:0.4.4' implementation project(':transloadit-android') diff --git a/examples/src/main/AndroidManifest.xml b/examples/src/main/AndroidManifest.xml index 0a96f9f..88d048a 100644 --- a/examples/src/main/AndroidManifest.xml +++ b/examples/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - + diff --git a/gradle.properties b/gradle.properties index 9e6fce1..728a916 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,3 +17,8 @@ org.gradle.jvmargs=-Xmx1536m # 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 +android.enableR8.fullMode=true +android.nonTransitiveRClass=true +android.nonFinalResIds=true + + diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 399fa8e..95aaec7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jul 17 14:41:28 CEST 2023 +#Mon Mar 18 17:18:19 CET 2024 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/transloadit-android/build.gradle b/transloadit-android/build.gradle index c53aef7..25c2f2b 100644 --- a/transloadit-android/build.gradle +++ b/transloadit-android/build.gradle @@ -9,7 +9,7 @@ repositories { } android { - compileSdkVersion 34 + compileSdk 34 defaultConfig { minSdkVersion 15 targetSdkVersion 34 @@ -21,6 +21,7 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + namespace 'com.transloadit.sdk' } dependencies { @@ -41,27 +42,30 @@ version=config.version group=config.group description=config.description +afterEvaluate { + tasks.register('sourcesJar', Jar) { + archiveClassifier.set('sources') + from android.sourceSets.main.java.srcDirs + } -task sourcesJar(type: Jar) { - archiveClassifier.set('sources') - from android.sourceSets.main.java.srcDirs -} + tasks.register('javadoc', Javadoc) { + source = android.sourceSets.main.java.srcDirs + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + android.libraryVariants.all { variant -> + owner.classpath += variant.javaCompileProvider.get().classpath + } + } -task javadoc(type: Javadoc) { - source = android.sourceSets.main.java.srcDirs - classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) - android.libraryVariants.all { variant -> - owner.classpath += variant.javaCompileProvider.get().classpath + tasks.register('javadocJar', Jar) { + dependsOn javadoc + archiveClassifier.set('javadoc') + from javadoc.destinationDir } -} -task javadocJar(type: Jar, dependsOn: javadoc) { - archiveClassifier.set('javadoc') - from javadoc.destinationDir -} -artifacts { - archives sourcesJar, javadocJar + artifacts { + archives sourcesJar, javadocJar + } } def pomConfig = { @@ -92,7 +96,7 @@ publishing { publications { androidRelease(MavenPublication) { afterEvaluate { - from components.release + from components.findByName('release') groupId project.getGroup() artifactId 'transloadit-android' description project.getDescription() diff --git a/transloadit-android/src/main/AndroidManifest.xml b/transloadit-android/src/main/AndroidManifest.xml index d74cc50..a2f47b6 100644 --- a/transloadit-android/src/main/AndroidManifest.xml +++ b/transloadit-android/src/main/AndroidManifest.xml @@ -1,3 +1,2 @@ - +