upgrade agp to 7.3.0

This commit is contained in:
Taner Sener 2022-09-16 18:45:43 +01:00
parent d06e2cde69
commit 5e8ca9f4ae
18 changed files with 171 additions and 143 deletions

View File

@ -36,13 +36,13 @@ BUILD_VERSION=$(git describe --tags --always 2>>"${BASEDIR}"/build.log)
# PROCESS LTS BUILD OPTION FIRST AND SET BUILD TYPE: MAIN OR LTS
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
cp "${BASEDIR}"/tools/release/android/build.gradle "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
cp "${BASEDIR}"/tools/android/build.gradle "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
for argument in "$@"; do
if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then
enable_lts_build
BUILD_TYPE_ID+="LTS "
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
cp "${BASEDIR}"/tools/release/android/build.lts.gradle "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
cp "${BASEDIR}"/tools/android/build.lts.gradle "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
fi
done

View File

@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

View File

@ -1,25 +1,31 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
namespace 'com.arthenica.ffmpegkit'
compileSdk 31
ndkVersion "22.1.7171670"
defaultConfig {
minSdkVersion 24
targetSdkVersion 31
minSdk 24
targetSdk 31
versionCode 240510
versionName "5.1"
project.archivesBaseName = "ffmpeg-kit"
consumerProguardFiles 'proguard-rules.pro'
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
sourceSets {
main {
jniLibs.srcDirs = ["../libs"]
@ -44,11 +50,11 @@ task javadoc(type: Javadoc) {
}
dependencies {
implementation 'com.arthenica:smart-exception-java:0.1.1'
implementation 'com.arthenica:smart-exception-java:0.2.1'
testImplementation "androidx.test.ext:junit:1.1.3"
testImplementation "org.json:json:20201115"
testImplementation 'org.json:json:20220320'
}
if (System.properties.containsKey('releaseFFmpegKit')) {
apply from: "${rootProject.projectDir}/../tools/release/android/release.template.gradle"
apply from: "${rootProject.projectDir}/../tools/android/release.template.gradle"
}

View File

@ -1,10 +1,3 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-keep class com.arthenica.ffmpegkit.FFmpegKitConfig {
native <methods>;
void log(long, int, byte[]);

View File

@ -1 +1,3 @@
<manifest package="com.arthenica.ffmpegkit" />
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,25 +1,31 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
namespace 'com.arthenica.ffmpegkit'
compileSdk 31
ndkVersion "22.1.7171670"
defaultConfig {
minSdkVersion 24
targetSdkVersion 31
minSdk 24
targetSdk 31
versionCode 240510
versionName "5.1"
project.archivesBaseName = "ffmpeg-kit"
consumerProguardFiles 'proguard-rules.pro'
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
sourceSets {
main {
jniLibs.srcDirs = ["../libs"]
@ -44,11 +50,11 @@ task javadoc(type: Javadoc) {
}
dependencies {
implementation 'com.arthenica:smart-exception-java:0.1.1'
implementation 'com.arthenica:smart-exception-java:0.2.1'
testImplementation "androidx.test.ext:junit:1.1.3"
testImplementation "org.json:json:20201115"
testImplementation 'org.json:json:20220320'
}
if (System.properties.containsKey('releaseFFmpegKit')) {
apply from: "${rootProject.projectDir}/../tools/release/android/release.template.gradle"
apply from: "${rootProject.projectDir}/../tools/android/release.template.gradle"
}

View File

@ -1,25 +1,31 @@
apply plugin: 'com.android.library'
android {
compileSdkVersion 31
namespace 'com.arthenica.ffmpegkit'
compileSdk 31
ndkVersion "22.1.7171670"
defaultConfig {
minSdkVersion 16
targetSdkVersion 31
minSdk 16
targetSdk 31
versionCode 160510
versionName "5.1.LTS"
project.archivesBaseName = "ffmpeg-kit"
consumerProguardFiles 'proguard-rules.pro'
consumerProguardFiles "consumer-rules.pro"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
jniLibs.srcDirs = ["../libs"]
@ -44,11 +50,11 @@ task javadoc(type: Javadoc) {
}
dependencies {
implementation 'com.arthenica:smart-exception-java:0.1.1'
implementation 'com.arthenica:smart-exception-java:0.2.1'
testImplementation "androidx.test.ext:junit:1.1.3"
testImplementation "org.json:json:20201115"
testImplementation 'org.json:json:20220320'
}
if (System.properties.containsKey('releaseFFmpegKit')) {
apply from: "${rootProject.projectDir}/../tools/release/android/release.template.gradle"
apply from: "${rootProject.projectDir}/../tools/android/release.template.gradle"
}

View File

@ -0,0 +1,114 @@
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
apply plugin: 'maven-publish'
apply plugin: 'signing'
group = 'com.arthenica'
archivesBaseName = releaseProject
version = releaseVersionName
File propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(propertiesFile))
properties.each { name, value ->
ext[name] = value
}
}
ext {
publishedGroupId = group
artifact = releaseProject
libraryName = releaseProject
libraryVersion = version
libraryDescription = releaseProjectDescription
siteUrl = 'https://github.com/tanersener/ffmpeg-kit'
gitUrl = 'https://github.com/tanersener/ffmpeg-kit.git'
developerId = 'tanersener'
developerName = 'Taner Sener'
developerEmail = 'tanersener@gmail.com'
if (Project.hasProperty('releaseGPL')) {
licenseName = 'GNU General Public License version 3'
licenseUrl = 'https://www.gnu.org/licenses/gpl-3.0.txt'
} else {
licenseName = 'GNU Lesser General Public License, Version 3'
licenseUrl = 'https://www.gnu.org/licenses/lgpl-3.0.txt'
}
}
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId group
artifactId = libraryName
version = version
from components.release
artifact sourcesJar
artifact javadocJar
pom {
packaging 'aar'
name = libraryName
description = libraryDescription
url = siteUrl
licenses {
license {
name = licenseName
url = licenseUrl
}
}
developers {
developer {
id = developerId
name = developerName
email = developerEmail
}
}
scm {
connection = gitUrl
developerConnection = gitUrl
url = siteUrl
}
}
}
}
repositories {
maven {
var releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
var snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ossrhUsername
password ossrhPassword
}
}
}
}
}
signing {
sign publishing.publications
}

View File

@ -29,7 +29,7 @@ export VERSION_CODE=${VERSION_CODE:0:6}
if [[ "${ANDROID_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${ANDROID_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update ffmpegkit.h versions for both android and ios"
echo "5. Update versions in Doxyfile"

View File

@ -29,7 +29,7 @@ export VERSION_CODE=${VERSION_CODE:0:6}
if [[ "${ANDROID_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${ANDROID_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update ffmpegkit.h versions for both android and ios"
echo "5. Update versions in Doxyfile"

View File

@ -1,99 +0,0 @@
task sourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier.set('javadoc')
from javadoc.destinationDir
}
artifacts {
archives javadocJar
archives sourcesJar
}
apply plugin: 'maven'
apply plugin: 'signing'
group = 'com.arthenica'
archivesBaseName = releaseProject
version = releaseVersionName
File propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(new FileInputStream(propertiesFile))
properties.each { name, value ->
ext[name] = value
}
}
ext {
publishedGroupId = group
artifact = releaseProject
libraryName = releaseProject
libraryVersion = version
libraryDescription = releaseProjectDescription
siteUrl = 'https://github.com/tanersener/ffmpeg-kit'
gitUrl = 'https://github.com/tanersener/ffmpeg-kit.git'
developerId = 'tanersener'
developerName = 'Taner Sener'
developerEmail = 'tanersener@gmail.com'
if (Project.hasProperty('releaseGPL')) {
licenseName = 'GNU General Public License version 3'
licenseUrl = 'https://www.gnu.org/licenses/gpl-3.0.txt'
} else {
licenseName = 'GNU Lesser General Public License, Version 3'
licenseUrl = 'https://www.gnu.org/licenses/lgpl-3.0.txt'
}
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
packaging 'aar'
name = libraryName
description = libraryDescription
url = siteUrl
licenses {
license {
name = licenseName
url = licenseUrl
}
}
developers {
developer {
id developerId
name developerName
email developerEmail
}
}
scm {
connection gitUrl
developerConnection gitUrl
url siteUrl
}
}
}
}
}
signing {
sign configurations.archives
}

View File

@ -38,7 +38,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple"

View File

@ -41,7 +41,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple"

View File

@ -38,7 +38,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple"

View File

@ -41,7 +41,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple"

View File

@ -37,7 +37,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple"

View File

@ -41,7 +41,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then
echo "Error: version mismatch. v$1 requested but v${APPLE_FFMPEG_KIT_VERSION} found. Please perform the following updates and try again."
echo "1. Update docs"
echo "2. Update gradle files under the tools/release/android folder"
echo "2. Update gradle files under the tools/android folder"
echo "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple"