Skip to content

Commit

Permalink
Merge pull request #17 from transloadit/update_gradle
Browse files Browse the repository at this point in the history
Update Build Toolchain
  • Loading branch information
Acconut authored Mar 19, 2024
2 parents c45f24a + 43a13ad commit 6323947
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 32 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand All @@ -24,8 +24,8 @@ allprojects {
}
}

task clean(type: Delete) {
delete rootProject.buildDir
tasks.register('clean', Delete) {
delete rootProject.getLayout().getBuildDirectory()
}

nexusPublishing {
Expand Down
7 changes: 4 additions & 3 deletions examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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')
Expand Down
3 changes: 1 addition & 2 deletions examples/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.transloadit.examples">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />

Expand Down
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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


6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
40 changes: 22 additions & 18 deletions transloadit-android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repositories {
}

android {
compileSdkVersion 34
compileSdk 34
defaultConfig {
minSdkVersion 15
targetSdkVersion 34
Expand All @@ -21,6 +21,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
namespace 'com.transloadit.sdk'
}

dependencies {
Expand All @@ -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 = {
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions transloadit-android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.transloadit.sdk">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

0 comments on commit 6323947

Please sign in to comment.