Skip to content

Commit

Permalink
整理gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
lilei committed Feb 20, 2019
1 parent 4d10758 commit af49ed6
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 17 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
![](https://upload-images.jianshu.io/upload_images/869487-9964307c9145ba73.png?imageMogr2/auto-orient/strip)


# 基本使用
# 如何使用

```
implementation 'me.hiten:jkcardlayout:0.1.1'
```

## 卡片布局辅助类CardLayoutHelper

Expand Down
20 changes: 19 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

ext.compile_version = 28
ext.target_version = 28
ext.min_version = 15
ext.support_version = '28.0.0'

ext.constraint_layout_version = '1.1.3'
ext.glide_version = '4.9.0'

ext.library_version_code = 11
ext.library_version = '0.1.1'


ext.kotlin_version = '1.3.20'

ext.publish_switch = false

repositories {
google()
jcenter()
Expand All @@ -10,7 +26,9 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

if(publish_switch){
classpath 'com.novoda:bintray-release:0.9'
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand Down
28 changes: 21 additions & 7 deletions library/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 28
compileSdkVersion compile_version

defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
minSdkVersion min_version
targetSdkVersion target_version
versionCode library_version_code
versionName library_version
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

}
Expand All @@ -23,9 +23,23 @@ android {

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support:recyclerview-v7:$support_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

if(publish_switch){
apply plugin: 'com.novoda.bintray-release'

publish{
userOrg = 'hiten'
groupId = 'me.hiten'
artifactId = 'jkcardlayout'
publishVersion = library_version
desc = 'JKCardLayout'
website = 'https://github.com/HitenDev/JKCardLayout'

}
}
16 changes: 8 additions & 8 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 28
compileSdkVersion compile_version

defaultConfig {
applicationId "me.hiten.jkcardlayout.sample"
minSdkVersion 15
targetSdkVersion 28
minSdkVersion min_version
targetSdkVersion target_version
versionCode 1
versionName "1.0"

Expand All @@ -27,11 +27,11 @@ android {

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
implementation "com.android.support:appcompat-v7:$support_version"
implementation "com.android.support:recyclerview-v7:$support_version"
implementation "com.android.support.constraint:constraint-layout:$constraint_layout_version"
implementation "com.android.support:cardview-v7:$support_version"
implementation "com.github.bumptech.glide:glide:$glide_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
Expand Down

0 comments on commit af49ed6

Please sign in to comment.