Skip to content

Commit

Permalink
Merge pull request #43 from AAkira/v1.4.2
Browse files Browse the repository at this point in the history
V1.4.2
  • Loading branch information
AAkira committed Feb 11, 2016
2 parents c14433c + 86a3c35 commit 997b85e
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 114 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
An android library that brings the expandable layout with various animation.
You can include optional contents and use everywhere.

[![Circle CI](https://circleci.com/gh/AAkira/ExpandableLayout.svg?style=shield&circle-token=cb7464e0215aaecb740936d1d68010ee0ffd4806)](https://circleci.com/gh/AAkira/ExpandableLayout)
[![Platform](http://img.shields.io/badge/platform-android-brightgreen.svg?style=flat)](http://developer.android.com/index.html)
[![Language](http://img.shields.io/badge/language-java-orange.svg?style=flat)](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
[![License](http://img.shields.io/badge/license-apache2.0-lightgrey.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
Expand Down Expand Up @@ -229,7 +230,7 @@ buildscript {
}
dependencies {
compile 'com.github.aakira:expandable-layout:1.4.1@aar'
compile 'com.github.aakira:expandable-layout:1.4.2@aar'
}
```

Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
classpath 'com.novoda:bintray-release:0.3.4'
}
}

Expand Down
23 changes: 23 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
machine:
timezone: Asia/Tokyo
java:
version: openjdk7
environment:
JAVA_OPTS: "-Xms256m -Xmx1024m -XX:MaxPermSize=512m"
ADB_INSTALL_TIMEOUT: 8

dependencies:
cache_directories:
- ~/.android
- /usr/local/android-sdk-linux

test:
pre:
- emulator -avd circleci-android21 -no-skin -no-audio -no-window:
background: true
parallel: true
- circle-android wait-for-boot
override:
- ./gradlew connectedAndroidTest -PdisablePreDex
post:
- cp -R ./library/build/reports/androidTests/connected/* $CIRCLE_ARTIFACTS
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ COMPILE_SDK_VERSION=23
BUILD_TOOLS_VERSION=22.0.1
MIN_SDK_VERSION=11
TARGET_SDK_VERSION=23
VERSION_CODE=6
VERSION_NAME=1.4.1
VERSION_CODE=7
VERSION_NAME=1.4.2
SUPPORT_TEST_VERSION=0.4.1
HAMCREST_VERSION=1.3

SUPPORT_APP_COMPAT_VERSION=23.0.1

Expand Down
25 changes: 0 additions & 25 deletions library/android-artifacts.gradle

This file was deleted.

61 changes: 0 additions & 61 deletions library/bintray-publish.gradle

This file was deleted.

52 changes: 29 additions & 23 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'

android {
compileSdkVersion COMPILE_SDK_VERSION as int
Expand All @@ -9,36 +10,41 @@ android {
targetSdkVersion TARGET_SDK_VERSION as int
versionCode VERSION_CODE as int
versionName VERSION_NAME
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}

dependencies {
compile "com.android.support:appcompat-v7:$SUPPORT_APP_COMPAT_VERSION"
androidTestCompile "com.android.support:support-annotations:$SUPPORT_APP_COMPAT_VERSION"
androidTestCompile "com.android.support.test:runner:$SUPPORT_TEST_VERSION"
androidTestCompile "com.android.support.test:rules:$SUPPORT_TEST_VERSION"
androidTestCompile "org.hamcrest:hamcrest-library:$HAMCREST_VERSION"
}

android.libraryVariants.all { variant ->
if (variant.buildType.isDebuggable()) {
return; // Skip debug builds.
}
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
ext.androidJar = System.getenv("ANDROID_HOME") + "/platforms/${android.compileSdkVersion}/android.jar"
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
}
def getBintrayUserProperty() {
return hasProperty('bintrayUser') ? bintrayUser : ""
}

task("bundleJavadoc${variant.name.capitalize()}", type: Jar) {
description "Bundles Javadoc into zip for $variant.name."
classifier = "javadoc"
from tasks["javadoc${variant.name.capitalize()}"]
}
def getBintrayApiKeyProperty() {
return hasProperty('bintrayApiKey') ? bintrayApiKey : ""
}

apply from: 'android-artifacts.gradle'
apply from: 'bintray-publish.gradle'
publish {
userOrg = POM_DEVELOPER_ID
repoName = 'maven'
groupId = GROUP
artifactId = ARTIFACT_ID
publishVersion = VERSION_NAME
licences = ['Apache-2.0']
desc = POM_DESCRIPTION
website = POM_URL
issueTracker = ISSUE_URL
repository = POM_SCM_URL
autoPublish = false
bintrayUser = bintrayUserProperty
bintrayKey = bintrayApiKeyProperty
dryRun = false
publications = ['maven']
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.github.aakira.expandablelayout;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.test.runner.AndroidJUnit4;
import android.view.AbsSavedState;
import android.view.View;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

@RunWith(AndroidJUnit4.class)
public class ExpandableSavedStateTest {

@Test
public void testWriteToParcel() {
final Parcelable parcelable = new View.BaseSavedState(AbsSavedState.EMPTY_STATE);
final ExpandableSavedState ss = new ExpandableSavedState(parcelable);
ss.setSize(1000);
ss.setWeight(0.5f);

final Parcel parcel = Parcel.obtain();
ss.writeToParcel(parcel, 0);
parcel.setDataPosition(0);

final ExpandableSavedState target = ExpandableSavedState.CREATOR.createFromParcel(parcel);
assertThat(target.getSize(), is(1000));
assertThat(target.getWeight(), is(0.5f));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public void setWeight(float weight) {
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeInt(this.size);
out.writeFloat(this.weight);
}

public static final Creator<ExpandableSavedState> CREATOR =
Expand Down

0 comments on commit 997b85e

Please sign in to comment.