mirror of
https://github.com/alibaba/Tangram-Android.git
synced 2026-10-17 05:07:05 +08:00
split tangram module to tangram and tangram3
This commit is contained in:
+1
-1
@@ -44,7 +44,7 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
|
||||
GROUP=com.alibaba.android
|
||||
ARTIFACT=tangram
|
||||
ARTIFACT=tangram3
|
||||
VERSION=1
|
||||
VERSION_NAME=3.5.9.3
|
||||
PACKAGING_TYPE=aar
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
include ':tangram'
|
||||
include ':tangram3'
|
||||
include ':examples'
|
||||
|
||||
File configFile = file('./config.gradle')
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/build
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2018 Alibaba Group
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
||||
maven { url "http://oss.jfrog.org/oss-snapshot-local/" }
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven { url 'https://maven.google.com' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:2.3.0'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
||||
maven { url "http://oss.jfrog.org/oss-snapshot-local/" }
|
||||
jcenter()
|
||||
mavenLocal()
|
||||
maven { url 'https://maven.google.com' }
|
||||
}
|
||||
|
||||
ext {
|
||||
bintrayRepo = 'Tangram'
|
||||
bintrayName = 'Tangram-Android'
|
||||
|
||||
publishedGroupId = project.hasProperty('GROUP') ? GROUP : ''
|
||||
libraryName = project.hasProperty('ARTIFACT') ? ARTIFACT : ''
|
||||
artifact = project.hasProperty('ARTIFACT') ? ARTIFACT : ''
|
||||
|
||||
libraryDescription = 'Tangram is a modular UI solution for building native page dynamically including Tangram for Android, Tangram for iOS and even backend CMS. This project provides the sdk on Android.'
|
||||
|
||||
siteUrl = 'https://github.com/alibaba/Tangram-Android'
|
||||
gitUrl = 'https://github.com/alibaba/Tangram-Android.git'
|
||||
|
||||
libraryVersion = project.hasProperty('VERSION_NAME') ? VERSION_NAME : ''
|
||||
|
||||
developerId = 'longerian'
|
||||
developerName = 'longerian'
|
||||
developerEmail = 'xlhongultimate@gmail.com'
|
||||
|
||||
licenseName = 'MIT'
|
||||
licenseUrl = 'https://opensource.org/licenses/MIT'
|
||||
allLicenses = ["MIT"]
|
||||
}
|
||||
|
||||
def VERSION = System.properties['version'] ?: '10'
|
||||
def VERSION_NAME = System.properties['versionName'] ?: '0.1.0'
|
||||
|
||||
android {
|
||||
compileSdkVersion Integer.parseInt(System.properties['compileSdkVersion'] ?: '26')
|
||||
buildToolsVersion System.properties['buildToolsVersion'] ?: '26.0.2'
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion Integer.parseInt(System.properties['targetSdkVersion'] ?: '26')
|
||||
versionCode Integer.parseInt(VERSION)
|
||||
versionName VERSION_NAME
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
// check for updates every build
|
||||
resolutionStrategy.cacheChangingModulesFor 60, 'seconds'
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
if (project.hasProperty('vlayoutDevMode')) {
|
||||
println 'compile with vlayout source code'
|
||||
compile(project(':vlayout')) {
|
||||
exclude group: 'com.android.support', module: 'recyclerview-v7'
|
||||
exclude group: 'com.android.support', module: 'support-v4'
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
}
|
||||
} else {
|
||||
compile('com.alibaba.android:vlayout:1.2.40@aar') {
|
||||
changing = true
|
||||
}
|
||||
}
|
||||
|
||||
provided 'io.reactivex.rxjava2:rxjava:2.1.12'
|
||||
provided 'io.reactivex.rxjava2:rxandroid:2.0.2'
|
||||
compile 'com.android.support:recyclerview-v7:26.0.2'
|
||||
compile 'com.android.support:support-v4:26.0.2'
|
||||
compile 'com.android.support:support-annotations:26.0.2'
|
||||
compile 'com.alibaba:fastjson:1.1.54.android@jar'
|
||||
if (project.hasProperty('ultraViewPagerDevMode')) {
|
||||
println 'compile with ultraViewPager source code'
|
||||
compile project(':ultraviewpager')
|
||||
} else {
|
||||
compile 'com.alibaba.android:ultraviewpager:1.0.7.8@aar'
|
||||
}
|
||||
}
|
||||
|
||||
File deployConfig = rootProject.file('jcenterInstall.gradle')
|
||||
if (deployConfig.exists()) {
|
||||
apply from: rootProject.file('jcenterInstall.gradle')
|
||||
}
|
||||
|
||||
deployConfig = rootProject.file('jcenterDeploy.gradle')
|
||||
if (deployConfig.exists()) {
|
||||
apply from: rootProject.file('jcenterDeploy.gradle')
|
||||
}
|
||||
|
||||
deployConfig = rootProject.file('deploy.gradle')
|
||||
if (deployConfig.exists()) {
|
||||
apply from: rootProject.file('deploy.gradle')
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in /Users/longerian/Documents/devtools/android-sdk-macosx/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 *;
|
||||
#}
|
||||
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
~ MIT License
|
||||
~
|
||||
~ Copyright (c) 2018 Alibaba Group
|
||||
~
|
||||
~ Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
~ of this software and associated documentation files (the "Software"), to deal
|
||||
~ in the Software without restriction, including without limitation the rights
|
||||
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
~ copies of the Software, and to permit persons to whom the Software is
|
||||
~ furnished to do so, subject to the following conditions:
|
||||
~
|
||||
~ The above copyright notice and this permission notice shall be included in all
|
||||
~ copies or substantial portions of the Software.
|
||||
~
|
||||
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
~ SOFTWARE.
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.tmall.wireless.tangram3.core">
|
||||
</manifest>
|
||||
+5
-5
@@ -29,7 +29,7 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.alibaba.android.vlayout.VirtualLayoutManager;
|
||||
import com.tmall.wireless.tangram.core.R;
|
||||
import com.tmall.wireless.tangram3.core.R;
|
||||
import com.tmall.wireless.tangram3.core.service.ServiceManager;
|
||||
import com.tmall.wireless.tangram3.dataparser.concrete.BaseCellBinderResolver;
|
||||
import com.tmall.wireless.tangram3.structure.BaseCell;
|
||||
@@ -42,10 +42,10 @@ import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.tmall.wireless.tangram.dataparser.concrete.Style.MARGIN_BOTTOM_INDEX;
|
||||
import static com.tmall.wireless.tangram.dataparser.concrete.Style.MARGIN_LEFT_INDEX;
|
||||
import static com.tmall.wireless.tangram.dataparser.concrete.Style.MARGIN_RIGHT_INDEX;
|
||||
import static com.tmall.wireless.tangram.dataparser.concrete.Style.MARGIN_TOP_INDEX;
|
||||
import static com.tmall.wireless.tangram3.dataparser.concrete.Style.MARGIN_BOTTOM_INDEX;
|
||||
import static com.tmall.wireless.tangram3.dataparser.concrete.Style.MARGIN_LEFT_INDEX;
|
||||
import static com.tmall.wireless.tangram3.dataparser.concrete.Style.MARGIN_RIGHT_INDEX;
|
||||
import static com.tmall.wireless.tangram3.dataparser.concrete.Style.MARGIN_TOP_INDEX;
|
||||
|
||||
/**
|
||||
* Created by mikeafc on 16/4/25.
|
||||
+1
-1
@@ -28,7 +28,7 @@ import android.graphics.Color;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.tmall.wireless.tangram.core.R;
|
||||
import com.tmall.wireless.tangram3.core.R;
|
||||
import com.tmall.wireless.tangram3.core.adapter.BinderViewHolder;
|
||||
import com.tmall.wireless.tangram3.core.adapter.GroupBasicAdapter;
|
||||
import com.tmall.wireless.tangram3.dataparser.concrete.Style;
|
||||
+2
-2
@@ -32,7 +32,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.tmall.wireless.tangram.core.R;
|
||||
import com.tmall.wireless.tangram3.core.R;
|
||||
import com.tmall.wireless.tangram3.TangramBuilder;
|
||||
import com.tmall.wireless.tangram3.util.LogUtils;
|
||||
|
||||
@@ -74,7 +74,7 @@ public class ViewHolderCreator<T extends ViewHolderCreator.ViewHolder, V extends
|
||||
|
||||
}
|
||||
|
||||
public static ViewHolderCreator.ViewHolder getViewHolderFromView(@NonNull View view) {
|
||||
public static ViewHolder getViewHolderFromView(@NonNull View view) {
|
||||
Object holder = view.getTag(R.id.TANGRAM_VIEW_HOLDER_TAG);
|
||||
if (holder instanceof ViewHolder) {
|
||||
return (ViewHolder) holder;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user