Permalink
Browse files

添加管理桥接代码的项目; 忽略gradle不必要的文件

  • Loading branch information...
U-UZ\litl U-UZ\litl
U-UZ\litl authored and U-UZ\litl committed Jun 13, 2017
1 parent 2fb9761 commit 57876b5f7457fd196e1c1720f60ab4fe7cb0f5b7
Showing with 868 additions and 0 deletions.
  1. +13 −0 .gitignore
  2. +9 −0 Android-Unity-Bridge/MobLink/.classpath
  3. +33 −0 Android-Unity-Bridge/MobLink/.project
  4. +13 −0 Android-Unity-Bridge/MobLink/AndroidManifest.xml
  5. +108 −0 Android-Unity-Bridge/MobLink/build-mix.gradle
  6. +55 −0 Android-Unity-Bridge/MobLink/build.gradle
  7. BIN Android-Unity-Bridge/MobLink/libs/MobCommons.jar
  8. BIN Android-Unity-Bridge/MobLink/libs/MobLink-2.0.0.jar
  9. BIN Android-Unity-Bridge/MobLink/libs/MobTools.jar
  10. +71 −0 Android-Unity-Bridge/MobLink/proguard-project.txt
  11. +15 −0 Android-Unity-Bridge/MobLink/project.properties
  12. +9 −0 Android-Unity-Bridge/UnityBridge/.classpath
  13. +33 −0 Android-Unity-Bridge/UnityBridge/.project
  14. +13 −0 Android-Unity-Bridge/UnityBridge/AndroidManifest.xml
  15. +51 −0 Android-Unity-Bridge/UnityBridge/build.gradle
  16. BIN Android-Unity-Bridge/UnityBridge/libs/Unity3d-Foundation.jar
  17. +15 −0 Android-Unity-Bridge/UnityBridge/project.properties
  18. +12 −0 Android-Unity-Bridge/UnityBridge/src/main/AndroidManifest.xml
  19. +61 −0 Android-Unity-Bridge/UnityBridge/src/main/java/com/mob/moblink/unity/ActionListener.java
  20. +45 −0 Android-Unity-Bridge/UnityBridge/src/main/java/com/mob/moblink/unity/RestoreSceneListener.java
  21. +21 −0 Android-Unity-Bridge/UnityBridge/src/main/java/com/mob/moblink/unity/UnityPlayerActivity.java
  22. +23 −0 Android-Unity-Bridge/build.gradle
  23. +17 −0 Android-Unity-Bridge/gradle.properties
  24. +160 −0 Android-Unity-Bridge/gradlew
  25. +90 −0 Android-Unity-Bridge/gradlew.bat
  26. +1 −0 Android-Unity-Bridge/settings.gradle
View
@@ -34,3 +34,16 @@ sysinfo.txt
# we need unitypackage
#*.unitypackage
# Android-Unity-Bridge
*.iml
.gradle
.idea
gradle
build
captures
.DS_Store
local.properties
.externalNativeBuild
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MobLink</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mob.moblink"
android:versionCode="200"
android:versionName="2.0.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<application/>
</manifest>
@@ -0,0 +1,108 @@
// define the common method for android configuration
//
ext.findBuildTools = {
def localProperties = new File(projectDir, "local.properties")
String buildTools = "25.0.2";
if (localProperties.exists()) {
def properties = new Properties()
localProperties.withInputStream {
instr->properties.load(instr)
}
def sdkDir = properties.getProperty('sdk.dir')
def buildToolsDir = new File(sdkDir, "build-tools")
if (buildToolsDir.exists()) {
def tools = buildToolsDir.list()
if (tools != null) {
Arrays.sort(tools)
buildTools = tools[tools.length - 1]
}
}
}
logForfind("findBuildTools:" + buildTools)
return buildTools
}
ext.findCompileSdkVersion = {
int cimpileSdkVersion = 19
def projProp = new File(projectDir, "project.properties")
if (projProp.exists()) {
def properties = new Properties()
projProp.withInputStream {
instr->properties.load(instr)
}
def target = properties.getProperty('target').trim()
def pref = "android-"
if (target != null && target.startsWith(pref)) {
cimpileSdkVersion = Integer.parseInt(target.substring(pref.length()))
}
}
logForfind("findCompileSdkVersion:" + cimpileSdkVersion);
return cimpileSdkVersion;
}
ext.findProguardFile = {
String proguardFile = null;
def srcDir = new File(projectDir, "src")
srcDir = srcDir.listFiles();
if (null != srcDir && srcDir.length > 0) {
def file = new File(projectDir, "proguard-project.txt")
proguardFile = file.getAbsolutePath()
}
logForfind("findProguardFile:" + proguardFile);
return proguardFile;
}
ext.findTargetSdk = {
int targetSdk = 8;
def manifest = findManifest()
String temp = manifest.getAt("uses-sdk").getProperty('@android:targetSdkVersion').toString();
if (null != temp && temp.length() > 0) {
targetSdk = Integer.parseInt(temp);
}
logForfind("findTargetSdk:" + targetSdk)
return targetSdk;
}
ext.findMinSdk = {
int minSdk = 8;
def manifest = findManifest()
String temp = manifest.getAt("uses-sdk").getProperty('@android:minSdkVersion').toString();
if (null != temp && temp.length() > 0) {
minSdk = Integer.parseInt(temp);
}
logForfind("findMinSdk:" + minSdk)
return minSdk
}
ext.findVersionName = {
def manifest = findManifest();
String versionName = manifest.getProperty('@android:versionName')
logForfind("findVersionName:" + versionName)
return versionName
}
ext.findVersionCode = {
def manifest = findManifest();
String temp = manifest.getProperty('@android:versionCode');
def versionCode = Integer.parseInt(temp)
logForfind("findVersionCode:" + versionCode)
return versionCode
}
ext.findApplicationId = {
def manifest = findManifest();
String pkg = manifest.getProperty('@package');
logForfind("findApplicationId:" + pkg)
return pkg;
}
ext.findManifest = {
def file = new File(projectDir, "AndroidManifest.xml")
def xml = new XmlSlurper()
def manifest = xml.parse(file)
return manifest;
}
ext.logForfind = { msg ->
println("ext.find:" + msg)
}
@@ -0,0 +1,55 @@
apply plugin: 'com.android.library'
apply from: 'build-mix.gradle'
android {
compileSdkVersion findCompileSdkVersion()
buildToolsVersion findBuildTools()
defaultConfig {
minSdkVersion findMinSdk()
targetSdkVersion findTargetSdk()
versionCode findVersionCode()
versionName findVersionName()
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
assets.srcDirs = ['assets']
java.srcDirs = ['src']
aidl.srcDirs = ['src']
res.srcDirs = ['res']
jniLibs.srcDirs = ['libs']
}
}
buildTypes {
release {
minifyEnabled false
def proguard = findProguardFile()
if (null != proguard) {
proguardFiles proguard
}
}
debug {
minifyEnabled false
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
targetCompatibility JavaVersion.VERSION_1_6
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,71 @@
-dontoptimize
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-dontwarn
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-keepattributes SourceFile,LineNumberTable,Exceptions,InnerClasses,Signature
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.app.View
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep class android.net.http.SslError
-keep class android.webkit.**{*;}
-keep class eclipse.local.sdk.**{*;}
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep class **.R$* {
*;
}
# 下面这些是MobLink sdk 需要保持的 class
-keep class com.mob.commons.MOBLINK {
*;
}
-keep class com.mob.moblink.MobLink {
*;
}
-keep class com.mob.moblink.ActionListener {
*;
}
-keep class com.mob.moblink.RestoreSceneListener {
*;
}
-keep class com.mob.moblink.AbstractRestoreSceneListener {
*;
}
@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19
android.library=true
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MobLink</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mob.moblink"
android:versionCode="200"
android:versionName="2.0.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<application/>
</manifest>
Oops, something went wrong.

0 comments on commit 57876b5

Please sign in to comment.