-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #474 from cundong/dev
Add replugin-sample-extra Module
- Loading branch information
Showing
78 changed files
with
2,383 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# replugin-sample-extra 中是一些更高级的示例 | ||
|
||
其中,replugin-sample-extra/fresco 是对 Fresco 的使用,实现了宿主和插件公用一份Fresco代码。 | ||
|
||
FrescoHost是宿主代码,FrescoPlugin是插件代码。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 26 | ||
buildToolsVersion "26.0.2" | ||
|
||
defaultConfig { | ||
applicationId "com.qihoo360.replugin.fresco.host" | ||
minSdkVersion 14 | ||
targetSdkVersion 26 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
sourceSets { | ||
main { | ||
jniLibs.srcDirs = ['libs'] | ||
} | ||
} | ||
} | ||
|
||
/* | ||
* Copyright (C) 2005-2017 Qihoo 360 Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed To in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
// ATTENTION!!! Must be PLACED AFTER "android{}" to read the applicationId | ||
apply plugin: 'replugin-host-gradle' | ||
|
||
/** | ||
* 配置项均为可选配置,默认无需添加 | ||
* 更多可选配置项参见replugin-host-gradle的RepluginConfig类 | ||
* 可更改配置项参见 自动生成RePluginHostConfig.java | ||
*/ | ||
repluginHostConfig { | ||
|
||
/** | ||
* 是否使用 AppCompat 库 | ||
* 不需要个性化配置时,无需添加 | ||
*/ | ||
useAppCompat = true | ||
} | ||
|
||
dependencies { | ||
compile 'com.qihoo360.replugin:replugin-host-lib:2.2.1' | ||
|
||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | ||
exclude group: 'com.android.support', module: 'support-annotations' | ||
}) | ||
|
||
compile 'com.android.support:appcompat-v7:26.0.0-alpha1' | ||
testCompile 'junit:junit:4.12' | ||
|
||
// fresco依赖bolts-android | ||
compile "com.parse.bolts:bolts-android:1.4.0" | ||
} |
Binary file added
BIN
+306 KB
replugin-sample-extra/fresco/FrescoHost/app/libs/armeabi/libimagepipeline.so
Binary file not shown.
Binary file added
BIN
+127 KB
replugin-sample-extra/fresco/FrescoHost/app/libs/drawee-modified-1.7.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+390 KB
replugin-sample-extra/fresco/FrescoHost/app/libs/imagepipeline-1.7.1.jar
Binary file not shown.
Binary file added
BIN
+132 KB
replugin-sample-extra/fresco/FrescoHost/app/libs/imagepipeline-base-1.7.1.jar
Binary file not shown.
25 changes: 25 additions & 0 deletions
25
replugin-sample-extra/fresco/FrescoHost/app/proguard-rules.pro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in D:\Android\android-sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
38 changes: 38 additions & 0 deletions
38
replugin-sample-extra/fresco/FrescoHost/app/src/main/AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.qihoo360.replugin.fresco.host"> | ||
|
||
<!-- ======= REPLUGIN ======= --> | ||
<!-- SDK Only (4Stats)。也是“常用的”几个权限 --> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | ||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
<!-- ======================== --> | ||
|
||
<application | ||
android:name=".HostApp" | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/AppTheme"> | ||
|
||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
<activity | ||
android:name=".HostFrescoActivity" | ||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" | ||
android:label="Host Use Fresco" | ||
android:screenOrientation="portrait" /> | ||
</application> | ||
|
||
</manifest> |
Binary file added
BIN
+1.56 MB
replugin-sample-extra/fresco/FrescoHost/app/src/main/assets/plugins/plugin1.jar
Binary file not shown.
Oops, something went wrong.