Skip to content
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.2.0-rc01'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Aug 11, 2018
2 parents 9835796 + c47d1f9 commit 0dd7f5c
Show file tree
Hide file tree
Showing 25 changed files with 254 additions and 210 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,14 @@ To follow
The Materialize 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:materialize:1.1.2@aar"
implementation "com.android.support:appcompat-v7:${supportLibVersion}"

// the following uses the new androidx dependencies
implementation "com.mikepenz:materialize:1.2.0-rc01@aar"
implementation "com.google.android.material:material:${materialVersion}"
implementation "androidx.appcompat:appcompat:${androidXVersion}"
```

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

## How to use
### MaterializeBuilder

Expand Down
18 changes: 9 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ try {
}

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

defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 112
versionName '1.1.2'
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName
}
buildTypes {
debug {
Expand All @@ -40,9 +40,9 @@ android {
}

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

implementation project(':library')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mikepenz.materialize.app;

import android.app.Application;
import android.support.v7.app.AppCompatDelegate;
import androidx.appcompat.app.AppCompatDelegate;
import android.view.View;

import com.mikepenz.aboutlibraries.LibsConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mikepenz.materialize.app;

import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import androidx.fragment.app.FragmentManager;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import com.mikepenz.aboutlibraries.LibsBuilder;
import com.mikepenz.aboutlibraries.ui.LibsSupportFragment;
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
30 changes: 22 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
buildscript {
ext {
release = [
versionName: "1.2.0-rc01",
versionCode: 1200
]

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

versions = [
androidXVersion: '1.0.0-rc01',
materialVersion: '1.0.0-rc01'
]
}

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

Expand All @@ -17,10 +37,4 @@ allprojects {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}

ext {
compileSdkVersion = 27
buildToolsVersion = "27.0.0"
supportLibVersion = "27.0.0"
}
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.1.2
VERSION_CODE=112
GROUP=com.mikepenz
POM_DESCRIPTION=Materialize Library

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

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

POM_GITHUB_REPO=mikepenz/MaterialDrawer
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
23 changes: 12 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 112
versionName '1.1.2'
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName

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

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

dependencies {
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.google.android.material:material:${versions.materialVersion}"
implementation "androidx.appcompat:appcompat:${versions.androidXVersion}"
}

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 0dd7f5c

Please sign in to comment.