Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

[Android] Migration guide using local .aar file #1136

@MSOB7YY

Description

@MSOB7YY

This method doesnt require any forking, all changes can be made directly inside ur project

1. Download the AAR u want

2. Open cmd in the aar folder and execute the following

mvn install:install-file -Dfile=ffmpeg-kit-full-6.0-2.aar -DgroupId=com.local.ffmpeg-kit -DartifactId=full_binary -Dversion=6.0-2 -Dpackaging=aar -DoutputDirectory=./
  • note: replace -Dfile, -DgroupId, -DartifactId & -Dversion with proper ones if necessary

this will generate a pom module at the specified folder, open the output folder

Screenshot

Image

3. Create the same folder structure project/android/app/repo/com/local/ffmpeg-kit & move full_binary there

Screenshot

Image

3.1 (optional) Download smart-exception-common-0.2.1.jar & smart-exception-java-0.2.1.jar and put both in android/app/repo

4. In android/app/build.gradle, add the following deps

dependencies {
   // disable default dependency from the main repo
    configurations.implementation {
        exclude group: "com.arthenica", module: "ffmpeg-kit-https"
    }
    implementation "com.local.ffmpeg-kit:full_binary:6.0-2"
    implementation files('./repo/smart-exception-java-0.2.1.jar') // optional
    implementation files('./repo/smart-exception-common-0.2.1.jar') // optional
}

5. In android/build.gradle, add this custom maven url to repositories:

allprojects {
    repositories {
        maven {
          url = project(':app').file('repo')
        }
    }
...
}
Screenshot

Image

6. (optional) In android/app/proguard-rules.pro, add the following:

-keep class com.arthenica.smartexception.java.Exceptions

7. Done!

  • this method is for android only. it should work regardless the framework (flutter/react native/etc)
  • since u dont have to modify the original/forked repo, u can manipulate/add whatever aar u want, just like how it was with pubspec.yaml
  • instead of installing the pom module to local maven like other methods, this one adds it directly to the project, meaning u don't have to worry about ur ci/cd
  • much luv and thanks to @tanersener for ur support and maintaining this whole time! <3

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidAffect Android platform

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions