Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.6.0-rc01'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 18, 2018
2 parents 52b1e0c + d9d14d6 commit 3d0144c
Show file tree
Hide file tree
Showing 16 changed files with 232 additions and 194 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ It comes with following features:
The Crossfader Library is pushed to [Maven Central](http://search.maven.org/#search|ga|1|g%3A%22com.mikepenz%22), so you just need to add the following dependency to your `build.gradle`.

```javascript
implementation "com.mikepenz:crossfader:1.5.2@aar"
implementation "com.android.support:appcompat-v7:${supportLibVersion}"
implementation "com.mikepenz:crossfader:1.6.0-rc01"
implementation "androidx.appcompat:appcompat:${androidX}"
```

To use appcompat please use a version smaller than 1.6.0. (See the releases on GitHub)

## How to use

Initialize and create the Crossfader
```java
crossFader = new Crossfader()
//provide the view which should be the main content
//provide the view which should be the main content
.withContent(findViewById(R.id.crossfade_content))
//provide the view and it's width (in pixels) which should be displayed first
.withFirst(result.getSlider(), firstWidth)
Expand Down Expand Up @@ -71,7 +73,7 @@ protected void onSaveInstanceState(Bundle outState) {

# License

Copyright 2016 Mike Penz
Copyright 2018 Mike Penz

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
39 changes: 18 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@ try {
}

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

defaultConfig {
applicationId "com.mikepenz.crossfader.app"
minSdkVersion 14
targetSdkVersion 27
versionCode 152
versionName '1.5.2'
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName

setProperty("archivesBaseName", "Crossfader-v$versionName-c$versionCode")
}
buildTypes {
debug {
Expand All @@ -41,21 +42,17 @@ android {
}

dependencies {
compile project(':library')
implementation project(':library')

implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}"
implementation "androidx.appcompat:appcompat:${versions.androidX}"
implementation "androidx.cardview:cardview:${versions.androidX}"
implementation "androidx.recyclerview:recyclerview:${versions.androidX}"

compile('com.mikepenz:materialdrawer:5.9.5@aar') {
exclude group: "com.android.support"
transitive = true
}
compile('com.mikepenz:aboutlibraries:5.9.8@aar') {
transitive = true
}
compile 'com.mikepenz:google-material-typeface:3.0.1.1.original@aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0@aar'
implementation "com.mikepenz:materialdrawer:6.1.0-rc01"
implementation "com.mikepenz:aboutlibraries:6.2.0-rc01"

implementation 'com.mikepenz:google-material-typeface:3.0.1.1.original@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.0.13.0@aar'

compile 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import android.content.Context;
import android.os.Build;
import android.support.v4.widget.SlidingPaneLayout;
import androidx.slidingpanelayout.widget.SlidingPaneLayout;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_simple.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
android:layout_height="match_parent"
android:gravity="center">

<android.support.v7.widget.Toolbar
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
Expand Down
29 changes: 21 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
buildscript {
ext {
release = [
versionName: "1.6.0-rc01",
versionCode: 1600
]

setup = [
compileSdk: 28,
buildTools: "28.0.2",
minSdk : 14,
targetSdk : 28
]

versions = [
androidX: '1.0.0-rc01'
]
}

repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.novoda:bintray-release:0.7.0'
classpath 'com.android.tools.build:gradle:3.3.0-alpha06'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
}
}

ext {
compileSdkVersion = 27
buildToolsVersion = "27.0.2"
supportLibVersion = "27.0.2"
}

allprojects {
repositories {
google()
Expand Down
153 changes: 153 additions & 0 deletions gradle-release.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
@SuppressWarnings(["GroovyUnusedDeclaration", "GrMethodMayBeStatic"])
def isReleaseBuild() {
return !VERSION_NAME.contains("SNAPSHOT")
}

@SuppressWarnings("GroovyUnusedDeclaration")
def getRepositoryUsername() {
return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : ""
}

@SuppressWarnings("GroovyUnusedDeclaration")
def getRepositoryPassword() {
return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : ""
}

apply plugin: "com.jfrog.bintray"

afterEvaluate { project ->
apply plugin: 'maven-publish'
apply plugin: 'com.github.dcendents.android-maven'

if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}

task androidJavadocs(type: Javadoc) {
failOnError = false
source = android.sourceSets.main.java.source
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.source
}

bintray {
dryRun = false
publish = true
override = true
user = project.hasProperty('bintray.user') ? project.property('bintray.user') : System.getenv('BINTRAY_USER')
key = project.hasProperty('bintray.apikey') ? project.property('bintray.apikey') : System.getenv('BINTRAY_API_KEY')
def gpgkey = project.hasProperty('bintray.gpg.key') ? project.property('bintray.gpg.key') : System.getenv('BINTRAY_GPG_KEY')
def gpgpass = project.hasProperty('bintray.gpg.password') ? project.property('bintray.gpg.password') : System.getenv('BINTRAY_GPG_PASS')
def versionName = project.release.versionName

publications('release')

pkg {
publish = true

repo = "maven"
name = GROUP + ":" + POM_ARTIFACT_ID //the name (= identifier) on bintray
desc = POM_DESCRIPTION

websiteUrl = POM_URL
issueTrackerUrl = POM_SCM_URL_ISSUES
vcsUrl = POM_SCM_URL

githubRepo = POM_GITHUB_REPO
githubReleaseNotesFile = POM_GITHUB_README

publicDownloadNumbers = true
licenses = ["Apache-2.0"]
version {
name = versionName
vcsTag = versionName
released = new Date()

mavenCentralSync {
sync = true
user = getRepositoryUsername()
password = getRepositoryPassword()
close = '1'
}
gpg {
sign = true
passphrase = gpgpass
}
}
}
}

ext.addDependency = { dependencyNode, group, name, version ->
dependencyNode.appendNode('groupId', group)
dependencyNode.appendNode('artifactId', name)
dependencyNode.appendNode('version', version)
dependencyNode.appendNode('scope', "compile")
}

def pomConfig = {
licenses {
license {
name POM_LICENCE_NAME
url POM_LICENCE_URL
distribution POM_LICENCE_DIST
}
}
developers {
developer {
id POM_DEVELOPER_ID
name POM_DEVELOPER_NAME
email '[email protected]'
}
}
scm {
url POM_SCM_URL
connection POM_SCM_CONNECTION
developerConnection POM_SCM_DEV_CONNECTION
}
}

publishing {
publications {
release(MavenPublication) {
groupId GROUP
artifactId POM_ARTIFACT_ID
version project.release.versionName
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
artifact androidSourcesJar
artifact androidJavadocsJar

pom.withXml {
asNode().appendNode('name', POM_NAME);
asNode().appendNode('description', POM_DESCRIPTION);
asNode().appendNode('url', POM_SCM_URL);
def dependenciesNode = asNode().appendNode('dependencies');
configurations.implementation.allDependencies.each {
// Ensure dependencies such as fileTree are not included.
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
if (it.version != "unspecified") {
addDependency(dependencyNode, it.group, it.name, it.version)
} else {
addDependency(dependencyNode, it.getDependencyProject().findProperty("GROUP"), it.getDependencyProject().findProperty("POM_ARTIFACT_ID"), project.release.versionName)
}
}
}
asNode().children().last() + pomConfig
}
}
}
}
}
16 changes: 12 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
# Maven stuff
VERSION_NAME=1.5.2
VERSION_CODE=152
GROUP=com.mikepenz
POM_DESCRIPTION=Crossfader Library

POM_URL=https://github.com/mikepenz/Crossfader

POM_SCM_URL=https://github.com/mikepenz/Crossfader
POM_SCM_CONNECTION=scm:[email protected]:mikepenz/Crossfader.git
POM_SCM_DEV_CONNECTION=scm:[email protected]:mikepenz/Crossfader.git
POM_SCM_URL_ISSUES=https://github.com/mikepenz/Crossfader/issues

POM_GITHUB_REPO=mikepenz/Crossfader
POM_GITHUB_README=README.md

POM_LICENCE_NAME=The Apache Software License, Version 2.0
POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt
POM_LICENCE_DIST=repo

POM_DEVELOPER_ID=mikepenz
POM_DEVELOPER_NAME=Mike Penz
POM_DEVELOPER_NAME=Mike Penz

android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
22 changes: 11 additions & 11 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'

android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion setup.compileSdk
buildToolsVersion setup.buildTools

defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 152
versionName '1.5.2'
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName

resValue "string", "crossfader_lib_version", "${versionName}"
}
buildTypes {
release {
Expand All @@ -24,9 +25,8 @@ android {
}
}

apply from: 'gradle-mvn-push.gradle'
apply from: 'gradle-jcenter-push.gradle'

dependencies {
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "androidx.appcompat:appcompat:${versions.androidX}"
}

apply from: '../gradle-release.gradle'
11 changes: 0 additions & 11 deletions library/gradle-jcenter-push.gradle

This file was deleted.

Loading

0 comments on commit 3d0144c

Please sign in to comment.