upgrade agp to 7.3.0

pull/583/head
Taner Sener 3 years ago
parent d06e2cde69
commit 5e8ca9f4ae
  1. 4
      android.sh
  2. 2
      android/build.gradle
  3. 22
      android/ffmpeg-kit-android-lib/build.gradle
  4. 7
      android/ffmpeg-kit-android-lib/consumer-rules.pro
  5. 4
      android/ffmpeg-kit-android-lib/src/main/AndroidManifest.xml
  6. 2
      android/gradle/wrapper/gradle-wrapper.properties
  7. 22
      tools/android/build.gradle
  8. 22
      tools/android/build.lts.gradle
  9. 114
      tools/android/release.template.gradle
  10. 2
      tools/release/android.lts.sh
  11. 2
      tools/release/android.sh
  12. 99
      tools/release/android/release.template.gradle
  13. 2
      tools/release/ios.lts.sh
  14. 2
      tools/release/ios.sh
  15. 2
      tools/release/macos.lts.sh
  16. 2
      tools/release/macos.sh
  17. 2
      tools/release/tvos.lts.sh
  18. 2
      tools/release/tvos.sh

@ -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 # 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 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 for argument in "$@"; do
if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then
enable_lts_build enable_lts_build
BUILD_TYPE_ID+="LTS " BUILD_TYPE_ID+="LTS "
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1 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 fi
done done

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

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

@ -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 { -keep class com.arthenica.ffmpegkit.FFmpegKitConfig {
native <methods>; native <methods>;
void log(long, int, byte[]); void log(long, int, byte[]);

@ -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>

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists 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 zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

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

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

@ -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
}

@ -29,7 +29,7 @@ export VERSION_CODE=${VERSION_CODE:0:6}
if [[ "${ANDROID_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update ffmpegkit.h versions for both android and ios" echo "4. Update ffmpegkit.h versions for both android and ios"
echo "5. Update versions in Doxyfile" echo "5. Update versions in Doxyfile"

@ -29,7 +29,7 @@ export VERSION_CODE=${VERSION_CODE:0:6}
if [[ "${ANDROID_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update ffmpegkit.h versions for both android and ios" echo "4. Update ffmpegkit.h versions for both android and ios"
echo "5. Update versions in Doxyfile" echo "5. Update versions in Doxyfile"

@ -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
}

@ -38,7 +38,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links" echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple" echo "5. Update ffmpegkit.h versions for both android and apple"

@ -41,7 +41,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links" echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple" echo "5. Update ffmpegkit.h versions for both android and apple"

@ -38,7 +38,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links" echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple" echo "5. Update ffmpegkit.h versions for both android and apple"

@ -41,7 +41,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links" echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple" echo "5. Update ffmpegkit.h versions for both android and apple"

@ -37,7 +37,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links" echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple" echo "5. Update ffmpegkit.h versions for both android and apple"

@ -41,7 +41,7 @@ fi
if [[ "${APPLE_FFMPEG_KIT_VERSION}" != "$1" ]]; then 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 "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 "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 "3. Update the versions in tools/release/common.sh"
echo "4. Update podspec links" echo "4. Update podspec links"
echo "5. Update ffmpegkit.h versions for both android and apple" echo "5. Update ffmpegkit.h versions for both android and apple"

Loading…
Cancel
Save