Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.4.2 #43

Merged
merged 9 commits into from
Feb 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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