-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
202 changed files
with
3,601 additions
and
7,566 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,46 @@ | ||
Cube-SDK 是一个开发框架。这个框架致力于快速实现需求,解放生产力。 | ||
|
||
![Screen Shot](https://raw.githubusercontent.com/etao-open-source/cube-sdk/dev/screen-shot.png) | ||
|
||
文档: http://cube-sdk.liaohuqiu.net/cn | ||
|
||
Demo 项目移到了这里: https://github.com/liaohuqiu/android-cube-app | ||
|
||
### 在项目中引入 | ||
|
||
|
||
项目现在已经发布到了maven中央库,有 `aar` and `apklib` 和两种格式 | ||
|
||
##### 在 pom.xml 中 | ||
|
||
引用apklib: | ||
|
||
```xml | ||
<dependency> | ||
<groupId>in.srain.cube</groupId> | ||
<artifactId>cube-sdk</artifactId> | ||
<type>apklib</type> | ||
<version>1.0.42</version> | ||
</dependency> | ||
``` | ||
|
||
或者引入aar: | ||
|
||
``` | ||
<dependency> | ||
<groupId>in.srain.cube</groupId> | ||
<artifactId>cube-sdk</artifactId> | ||
<type>aar</type> | ||
<version>1.0.42</version> | ||
</dependency> | ||
``` | ||
|
||
##### 在 Gradle / Android Studio | ||
|
||
``` gradle | ||
compile 'in.srain.cube:cube-sdk:1.0.42@aar' | ||
````` | ||
##### eclipse | ||
直接将core文件夹下的内容作为一个类库加载,然后在项目中引用 |
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 |
---|---|---|
@@ -1,28 +1,48 @@ | ||
`Cube` is a light package for Android development. | ||
##[中文说明](https://github.com/etao-open-source/cube-sdk/blob/master/README-cn.md) | ||
|
||
|
||
`Cube` is a light package for Android development. | ||
|
||
![Screen Shot](https://raw.githubusercontent.com/etao-open-source/cube-sdk/dev/screen-shot.png) | ||
|
||
DEMO project has been moved to [HERE](https://github.com/liaohuqiu/android-cube-app). | ||
|
||
All of the `readme` content and document are moved to Github Pages, please visit the Github Pages for more imformation: | ||
|
||
### Usage | ||
http://cube-sdk.liaohuqiu.net | ||
|
||
It's in Maven Central: | ||
### Import to your project | ||
|
||
Cube-SDK has been pushed to Maven Central, both in `aar` and `apklib` format. | ||
|
||
##### Using in pom.xml | ||
|
||
```xml | ||
<dependency> | ||
<groupId>in.srain.cube</groupId> | ||
<artifactId>cube-sdk</artifactId> | ||
<type>apklib</type> | ||
<version>1.0.34</version> | ||
<version>1.0.42</version> | ||
</dependency> | ||
``` | ||
|
||
###[`Github Pages`](http://cube-sdk.liaohuqiu.net) | ||
or: | ||
|
||
``` | ||
<dependency> | ||
<groupId>in.srain.cube</groupId> | ||
<artifactId>cube-sdk</artifactId> | ||
<type>aar</type> | ||
<version>1.0.42</version> | ||
</dependency> | ||
``` | ||
|
||
###[`中文版文档`](http://cube-sdk.liaohuqiu.net/cn) | ||
###### Gradle / Android Studio | ||
|
||
--- | ||
``` gradle | ||
compile 'in.srain.cube:cube-sdk:1.0.42@aar' | ||
````` | ||
* srain@php.net | ||
* twitter: https://twitter.com/liaohuqiu | ||
* weibo: http://weibo.com/liaohuqiu | ||
* QQ交流群: 271918140 | ||
###### Eclipse | ||
Load the content into you eclipse, it's library project. Then use it in your application project. |
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,14 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.12.+' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,91 @@ | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.12.+' | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
mavenCentral(); | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) | ||
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION | ||
|
||
defaultConfig { | ||
applicationId "in.srain.cube" | ||
minSdkVersion 8 | ||
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) | ||
} | ||
|
||
sourceSets { | ||
main { | ||
manifest.srcFile 'AndroidManifest.xml' | ||
java.srcDirs = ['src'] | ||
resources.srcDirs = ['resources'] | ||
res.srcDirs = ['res'] | ||
assets.srcDirs = ['assets'] | ||
// aidl.srcDirs = ['src'] | ||
// renderscript.srcDirs = ['src'] | ||
} | ||
|
||
androidTest.setRoot('tests') | ||
} | ||
} | ||
|
||
task copyLibs << { | ||
|
||
// copy jars | ||
copy { | ||
from configurations.compile | ||
into "libs" | ||
|
||
// exclude: apkilib, aar, support-v* | ||
eachFile { file -> | ||
if (file.name.contains("apklib") || file.name.contains("aar")) { | ||
file.exclude() | ||
} | ||
} | ||
} | ||
|
||
// copy source | ||
copy { | ||
|
||
def sourceList = configurations.compile.incoming.dependencies.collect { dependency -> | ||
dependency.artifact { artifact -> | ||
artifact.name = dependency.name | ||
artifact.type = 'source' | ||
artifact.extension = 'jar' | ||
artifact.classifier = 'sources' | ||
} | ||
dependency | ||
} | ||
from(configurations.detachedConfiguration(sourceList as Dependency[]).resolvedConfiguration. | ||
resolvedConfiguration.lenientConfiguration.getFiles(Specs.SATISFIES_ALL)) { | ||
} | ||
|
||
into("libs") | ||
|
||
// exclude: apkilib, aar, support-v* | ||
eachFile { file -> | ||
if (file.name.contains("apklib") || file.name.contains("aar") || file.name.contains("support-v4")) { | ||
file.exclude() | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'in.srain.cube:clog:1.0.2' | ||
// compile 'com.android.support:support-v4:20.0.0' | ||
compile 'com.google.android:support-v4:r7' | ||
} | ||
apply from: './gradle-mvn-push.gradle' |
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,125 @@ | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
def isReleaseBuild() { | ||
return VERSION_NAME.contains("SNAPSHOT") == false | ||
} | ||
|
||
def getReleaseRepositoryUrl() { | ||
if (VERSION_NAME.contains("-ali") == true) { | ||
return 'http://mvnrepo.taobao.ali.com/mvn/repository'; | ||
} | ||
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL | ||
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
} | ||
|
||
def getSnapshotRepositoryUrl() { | ||
// only publish to snapshots | ||
if (VERSION_NAME.contains("-ali") == true) { | ||
return 'http://mvnrepo.taobao.ali.com/mvn/snapshots/'; | ||
} | ||
return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL | ||
: "https://oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
|
||
def getRepositoryUsername() { | ||
if (VERSION_NAME.contains("-ali") == true) { | ||
return ALI_USERNAME | ||
} | ||
return hasProperty('OSS_USERNAME') ? OSS_USERNAME : '' | ||
} | ||
|
||
def getRepositoryPassword() { | ||
if (VERSION_NAME.contains("-ali") == true) { | ||
return ALI_PWD | ||
} | ||
return hasProperty('OSS_PWD') ? OSS_PWD : '' | ||
} | ||
|
||
afterEvaluate { project -> | ||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
pom.groupId = POM_GROUP | ||
pom.artifactId = POM_ARTIFACT_ID | ||
pom.version = VERSION_NAME | ||
|
||
repository(url: getReleaseRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
snapshotRepository(url: getSnapshotRepositoryUrl()) { | ||
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) | ||
} | ||
|
||
pom.project { | ||
name POM_NAME | ||
packaging POM_PACKAGING | ||
description POM_DESCRIPTION | ||
url POM_URL | ||
|
||
scm { | ||
url POM_SCM_URL | ||
connection POM_SCM_CONNECTION | ||
developerConnection POM_SCM_DEV_CONNECTION | ||
} | ||
|
||
licenses { | ||
license { | ||
name POM_LICENCE_NAME | ||
url POM_LICENCE_URL | ||
distribution POM_LICENCE_DIST | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id POM_DEVELOPER_ID | ||
name POM_DEVELOPER_NAME | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } | ||
sign configurations.archives | ||
} | ||
|
||
task apklib(type: Zip) { | ||
|
||
appendix = extension = 'apklib' | ||
|
||
from 'AndroidManifest.xml' | ||
into('res') { | ||
from 'res' | ||
} | ||
into('src') { | ||
from 'src' | ||
} | ||
} | ||
|
||
task androidJavadocs(type: Javadoc) { | ||
source = android.sourceSets.main.java.srcDirs | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
|
||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
classifier = 'javadoc' | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.srcDirs | ||
} | ||
|
||
artifacts { | ||
archives androidSourcesJar | ||
archives androidJavadocsJar | ||
archives apklib | ||
} | ||
} |
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,24 @@ | ||
VERSION_NAME=1.0.42 | ||
|
||
ANDROID_BUILD_MIN_SDK_VERSION=8 | ||
ANDROID_BUILD_TARGET_SDK_VERSION=16 | ||
ANDROID_BUILD_SDK_VERSION=19 | ||
ANDROID_BUILD_TOOLS_VERSION=20.0.0 | ||
|
||
POM_GROUP=in.srain.cube | ||
POM_ARTIFACT_ID=cube-sdk | ||
POM_PACKAGING=aar | ||
|
||
POM_NAME=Cube SDK | ||
POM_DESCRIPTION=Cube SDK, library for Android development | ||
|
||
POM_URL=https://github.com/etao-open-source/cube-sdk | ||
POM_SCM_URL=https://github.com/etao-open-source/cube-sdk | ||
POM_SCM_CONNECTION=scm:https://github.com/etao-open-source/cube-sdk.git | ||
POM_SCM_DEV_CONNECTION=scm:https://github.com/etao-open-source/cube-sdk.git | ||
|
||
POM_LICENCE_NAME=Apache 2 | ||
POM_LICENCE_URL= | ||
POM_LICENCE_DIST=repo | ||
POM_DEVELOPER_ID=liaohuqiu | ||
POM_DEVELOPER_NAME=liaohuqiu |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.