Skip to content

Commit

Permalink
Upgrade stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nekocode committed Feb 6, 2019
1 parent f4bb275 commit 6cc1fee
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 28 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

![](art/preview.png)

## Using with gradle
## Integration
- Add the JitPack repository to your root build.gradle:
```gradle
repositories {
Expand All @@ -16,9 +16,10 @@ repositories {
- Add the dependency to your sub build.gradle:
```gradle
dependencies {
compile 'com.github.nekocode:Badge:{lastest-version}'
implementation "com.github.nekocode:Badge:${last-version}"
}
```

## Badge Types

This library provides four types of badges with cliche customizations.
Expand Down
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath "com.android.tools.build:gradle:3.3.0"
classpath "com.github.dcendents:android-maven-gradle-plugin:1.5"
}
}

allprojects {
repositories {
jcenter()
google()
}
group="com.github.nekocode"
}

task clean(type: Delete) {
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
COMPILE_SDK_VERSION=25
BUILD_TOOLS_VERSION=25.0.2
SUPPORT_LIBS_VERSION=25.3.1
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Apr 19 17:53:27 CST 2017
#Wed Feb 06 12:46:10 CST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
26 changes: 16 additions & 10 deletions lib-badge/build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group='com.github.nekocode'
apply plugin: "com.android.library"
apply plugin: "com.github.dcendents.android-maven"

android {
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
buildToolsVersion BUILD_TOOLS_VERSION

compileSdkVersion 28
defaultConfig {
minSdkVersion 11
targetSdkVersion 25
targetSdkVersion 28
}
lintOptions {
abortOnError false
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
provided "com.android.support:support-annotations:$SUPPORT_LIBS_VERSION"
implementation fileTree(dir: "libs", include: ["*.jar"])
compileOnly "com.android.support:support-annotations:28.0.0"
}

task androidSourcesJar(type: Jar) {
classifier = "sources"
baseName = archivesBaseName
from android.sourceSets.main.java.srcDirs
}

artifacts {
archives androidSourcesJar
}
16 changes: 7 additions & 9 deletions sample/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
apply plugin: 'com.android.application'
apply plugin: "com.android.application"

android {
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
buildToolsVersion BUILD_TOOLS_VERSION

compileSdkVersion 28
defaultConfig {
applicationId "cn.nekocode.badge.sample"
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(":lib-badge")
compile "com.android.support:appcompat-v7:$SUPPORT_LIBS_VERSION"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(":lib-badge")
implementation "com.android.support:appcompat-v7:28.0.0"
}

0 comments on commit 6cc1fee

Please sign in to comment.