Skip to content

Commit

Permalink
First release (#1)
Browse files Browse the repository at this point in the history
* Publish via task

* First release

* Update library version on sample, add description to deploy script, update README
  • Loading branch information
JoaquimLey authored Nov 25, 2016
1 parent 4653b90 commit 2590492
Show file tree
Hide file tree
Showing 29 changed files with 146 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ mirror/

# Local configuration file (sdk path, etc)
local.properties
deploy.properties
gradle.properties

# Proguard folder generated by Eclipse
Expand Down
29 changes: 13 additions & 16 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
![AppIcon](../master/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png)

#FabOptions < WIP not production ready, please use with caution >
###A multi-functional FAB component, with customizable _options_
#FabOptions

[![Download](https://api.bintray.com/packages/joaquimleyapps/opensource/FabOptions/images/download.svg?version=1.0) ](https://bintray.com/joaquimleyapps/opensource/FabOptions/1.0/link)
[![Download](https://api.bintray.com/packages/joaquimleyapps/opensource/com.github.joaquimley%3Afaboptions/images/download.svg)](https://bintray.com/joaquimleyapps/opensource/com.github.joaquimley%3Afaboptions/_latestVersion)
![minSdkVersion](https://img.shields.io/badge/minSdkVersion-21-yellow.svg?style=true)
![compileSdkVersion](https://img.shields.io/badge/compileSdkVersion-25-green.svg?style=true)

###A multi-functional FAB component with customizable options.
###Read more on the blog post: < WIP-Soon >

Original concept by **Praveen Bisht** posted on [MaterialUp](https://www.uplabs.com/posts/options-floating-interaction), design turned into code into open source library.
**Special thanks to [André Mion](https://github.com/andremion)** for the help provided on building this component.


Original concept by **Praveen Bisht** posted on [MaterialUp](https://www.uplabs.com/posts/options-floating-interaction), turned into code into open source library.


![Gif concept sample](../master/art/faboptions_materialup_demo.gif)

Expand All @@ -20,17 +24,13 @@ Android implementation

##How to use
- Import gradle dependency:

repositories {
jcenter()
}

dependencies {
compile 'com.joaquimley:FabOptions:1.0'
compile 'com.github.joaquimley:faboptions:1.0.0'
}

- Define a `menu` file with your buttons information e.g.
- Define a `menu` file with your buttons information **e.g.**

<menu>
<item
Expand Down Expand Up @@ -69,7 +69,7 @@ Android implementation

Via **XML**:

- Bind the buttons menuby adding the **custom attribute**: `app:button_menu="@menu/menu_your_menu"`
- Bind the buttons menu by adding the **custom attribute** `app:button_menu="@menu/menu_your_menu"` to your component XML

**Programmatically**

Expand All @@ -82,13 +82,10 @@ Via **XML**:

**Listening for click events**

- Set your fabOptions instance click listener, the defined Id's on the buttons `menu.xml`.

### A special thanks to [André Mion](https://github.com/andremion) for the help on building this component

- Set your FabOptions instance click listener, the defined Id's on the buttons `menu.xml`.


###The sample is available
###The sample is also available on the Playstore

[![Get it on Google Play](../master/art/google-play-badge.png)](https://play.google.com/store/apps/details?id=com.joaquimley.faboptions.sample)

Expand Down
16 changes: 4 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,20 @@
* limitations under the License.
*/

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

plugins {
id "com.jfrog.bintray" version "1.7"
}
allprojects {
repositories {
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
}
File renamed without changes.
17 changes: 7 additions & 10 deletions library/build.gradle → faboptions/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@
*/

apply plugin: 'com.android.library'


ext {
PUBLISH_GROUP_ID = 'com.joaquimley'
PUBLISH_ARTIFACT_ID = 'FabOptions'
PUBLISH_VERSION = '1.0'
}
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

android {
compileSdkVersion 25
Expand All @@ -30,8 +25,8 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion 25
versionCode 3
versionName "1.0"
versionCode 5
versionName "1.0.0"
vectorDrawables.useSupportLibrary = true
}

Expand All @@ -45,6 +40,8 @@ android {

dependencies {
final DESIGN_LIBRARY_VERSION = '25.0.1'

compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:design:$DESIGN_LIBRARY_VERSION"
}
apply from: 'https://raw.githubusercontent.com/JoaquimLey/jcenter-configs/master/android-release-aar.gradle'
apply from: 'deploy.gradle'
108 changes: 108 additions & 0 deletions faboptions/deploy.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
* Copyright (c) Joaquim Ley 2016. All Rights Reserved.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

Properties properties = new Properties()
properties.load(project.rootProject.file('deploy.properties').newDataInputStream())

group = properties.getProperty('group')
version = properties.getProperty('version')

bintray {
user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.apikey')
configurations = ['archives'] //When uploading configuration files
pkg {
repo = properties.getProperty('repo')
name = properties.getProperty('name')
userOrg = properties.getProperty('userOrg')
desc = properties.getProperty('description')
websiteUrl = properties.getProperty('websiteUrl')
issueTrackerUrl = properties.getProperty('issueTrackerUrl')
vcsUrl = properties.getProperty('vcsUrl')
licenses = [properties.getProperty('license')]
labels = properties.getProperty('labels')
publicDownloadNumbers = properties.getProperty('publicDownloadNumbers')
version {
name = properties.getProperty('versionName')
released = new Date()
desc = properties.getProperty('versionDescription')
vcsTag = properties.getProperty('vcsTag')
gpg {
//Determines whether to GPG sign the files. The default is false
sign = properties.getProperty('gpgSign')
passphrase = properties.getProperty("gpgPassphrase")
//Optional. The passphrase for GPG signing'
}
}
}
}

install {
repositories.mavenInstaller {
pom {
project {
packaging properties.getProperty('pomPackaging')
name properties.getProperty('pomName')
description properties.getProperty('pomName')
artifactId properties.getProperty('pomArtifactId')
url properties.getProperty('websiteUrl')
licenses {
license {
name properties.getProperty('pomLicenseName')
url properties.getProperty('pomLicenseUrl')
}
}
developers {
developer {
id properties.getProperty('pomDeveloperId')
name properties.getProperty('pomDeveloperName')
email properties.getProperty('pomDeveloperEmail')
}
}
scm {
connection properties.getProperty('vcsUrl')
developerConnection properties.getProperty('vcsUrl')
url properties.getProperty('websiteUrl')

}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives javadocJar
archives sourcesJar
}

task findConventions << {
println project.getConvention()
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joaquimley.faboptions">

<application
android:allowBackup="true"
android:supportsRtl="true">

</application>

<manifest package="com.joaquimley.faboptions">
<application />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import android.view.View;

/**
* FabOptions component {@link CoordinatorLayout.Behavior} to react to {@link Snackbar}
* FabOptions component default CoordinatorLayout.Behavior to react Snackbar
*/

class FabOptionsBehavior extends CoordinatorLayout.Behavior {
public class FabOptionsBehavior extends CoordinatorLayout.Behavior {

@Override
public boolean layoutDependsOn(CoordinatorLayout parent, View child, View dependency) {
Expand All @@ -35,7 +35,8 @@ public boolean layoutDependsOn(CoordinatorLayout parent, View child, View depend
public boolean onDependentViewChanged(CoordinatorLayout parent, View child, View dependency) {
float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight());
child.setTranslationY(translationY);
// TODO: 21/11/2016 handle the instanceof Bottomsheetnav
// TODO: 21/11/2016 Handle instanceof Bottomsheetnav & others
return true;
}
//FabOptions component default {@link CoordinatorLayout.Behavior} to react to {@link Snackbar}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ android {

dependencies {
final DESIGN_LIBRARY_VERSION = '25.0.1'
final FABOPTIONS_VERSION = '1.0'
final FABOPTIONS_VERSION = '1.0.0'

compile "com.android.support:design:$DESIGN_LIBRARY_VERSION"
compile "com.joaquimley:FabOptions:$FABOPTIONS_VERSION"
compile "com.github.joaquimley:faboptions:$FABOPTIONS_VERSION"
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
import static com.joaquimley.faboptions.sample.R.id.toolbar;

/**
* Faboptions sample via Java {@see FabOptions#setButtonMenu}
* Faboptions sample via Java {@see FabOptions#setButtonMenu()}
*/

public class JavaSampleActivity extends AppCompatActivity implements View.OnClickListener {

private Toolbar mToolbar;
Expand Down
3 changes: 1 addition & 2 deletions sample/src/main/res/layout/activity_sample_xml.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) Joaquim Ley 2016. All Rights Reserved.
~ <p/>
~ Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<string name="website">joaquimley.com</string>

<string name="change_activity">Change Activity</string>
<string name="action_snackbar_test_message">The FabOptions should react to me</string>
<string name="action_snackbar_test_message">FabOptions should react to me</string>
<string name="action_snackbar_test">Snackbar test</string>
</resources>
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

include ':sample', ':library'
include ':sample', ':faboptions'

0 comments on commit 2590492

Please sign in to comment.