Code Monkey home page Code Monkey logo

neptune's Introduction

Neptune

license Release Version PRs Welcome

Neptune is a flexible, powerful and lightweight plugin framework for Android.

It now runs plugins dynamically on billions of devices every day and carries many separated business modules of IQIYI such as Reader, Movie Tickets and etc..

Especially, Neptune is greatly compatible with Android P . It can run on Android P devices seamlessly and stably. Only few APIs in light greylist are used.

中文文档

Supported Features

Feature Detail
Supported Components Activity/Service/Receiver
Component registration in Host Manifest.xml No Need
Share Host App Class Supported
Share Host App Resources Supported
Resources Isolation Supported
Run individual App Supported
Android Features Almost all features
Compatibility Almost all roms
Process Isolation Supported
Plugin Dependency Supported
Plugin Development like normal app
Supported Android versions API Level 14+

Architecture

plugin_arch

Getting Started

Host Project

compile Neptune in application module of build.gradle.

    implementation 'org.qiyi.video:neptune:2.6.0'

Initialize sdk in your Application#onCreate().

public class XXXApplication extends Application {
    
    @Override
    public void onCreate() {
        NeptuneConfig config = new NeptuneConfig.NeptuneConfigBuilder()
                    .configSdkMode(NeptuneConfig.INSTRUMENTATION_MODE)
                    .enableDebug(BuildConfig.DEBUG)
                    .build();
        Neptune.init(this, config);
    }
}

more details and developer guide see wiki

Plugin Project

If plugin app wants to share resources with host app, you need add dependency in the buildscript block of build.gradle in root of plugin project as following.

dependencies {
    classpath  'com.iqiyi.tools.build:neptune-gradle:1.3.0'
}

Apply gradle plugin in application module of build.gradle and config it.

apply plugin: 'com.qiyi.neptune.plugin'

neptune {
    pluginMode = true      // In plugin apk build mode
    packageId = 0x30       // The package id of Resources
    hostDependencies = "{group1}:{artifact1};{group2}:{artifact2}" // host app resources dependencies
}

Developer Guide

Contribution

We sincerely appreciate your PR contribution of any kind , including codes, suggestions or documentation to improve our project.

License

Neptune is Apache v2.0 Licensed.

neptune's People

Contributors

zjupure avatar erjanmx avatar jwu26 avatar

Watchers

 avatar

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.