Giter Site home page Giter Site logo

android-soexcluder's Introduction

This plugin will help you exclude so files by flavor or buildType

中文版本 README

Usage

  1. Add the following scripts to your build.gradle

    buildscript {
       repositories {
          jcenter()
       }
    
       dependencies {
          classpath 'com.jween.gradle:android-soexcluder:1.1'
       }
    }
    
    
    apply plugin: 'com.android.application'
    apply plugin: 'android-soexcluder'

    Note: You MUST apply android-soexcluder along with com.android.application

  2. Wish we have step 2!

    But that's it, it a quite simple small tool to deal with so files.

Configuration

  1. Exclude specific so files by flavors

    soexcluder {
        // exclude armeabi-v7a/foo.so and armeabi-v8a/bar.so for flavor1
        flavor1 {
            exclude "lib/armeabi-v7a/foo.so", "lib/armeabi-v8a/bar.so"
        }
        
        // Reserve only v7a and x86 so files except foo.so for debug buildType
        debug {
            include "lib/armeabi-v7a/*.so" 
            include "lib/x86/*.so"
            exclude "lib/armeabi-v7a/foo.so"
            exclude "lib/x86/foo.so"
        }
    }
  2. Exact the same path pattern as gradle include/exclude api

    soexcluder {
        
        // Reserve all so files for debug buildType except foo.so
        debug {
            include "**/*" 
            exclude "**/foo.so"
        }
    }
  3. You can even use regex in flavor/buildType entry!

    soexcluder {
        
        // Remove all so files if the flavor or buildType name ends with 'o' 
        ".*o" {
            exclude "**/*"
        }
    }

License

"THE BEER-WARE LICENSE" (Revision 42):

<[email protected]> wrote this file. As long as you retain this notice
you can do whatever you want with this stuff. If we meet some day, and you think
this stuff is worth it, you can buy me a beer in return. -Jween Lau
  • The purpose of this license is to prevent anti-labour-law companies from using the software or codes under the license, and force those companies to weigh their way of working

  • See a full list of projects under Anti-996 License

  • This draft is adapted from the MIT license. For more detailed explanation, please see Wiki. This license is designed to be compatible with all major open source licenses.

  • For law professionals or anyone who is willing to contribute to future version directly, please go to Anti-996-License-1.0. Thank you.

android-soexcluder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

android-soexcluder's Issues

WARNING: API 'variantOutput.getPackageApplication()' is obsolete

WARNING: API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.
It will be removed at the end of 2019.

This error showed up as soon as I added soexcluder.

This is a wonderful library. Two thumbs up !

how to include some particular so and exclude others

soexcluder {
release {
include '*/libpl_droidsonroids_gif'
}
}

soexcluder {
release {
include '/libpl_droidsonroids_gif.so'
include '
/libpl_droidsonroids_gif_surface.so'
}
}

it does not work when i want just include libpl_droidsonroids_gif.so & libpl_droidsonroids_gif_surface.so,
such as above, it always only included ## libpl_droidsonroids_gif.so

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.