Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description:发布版本v1.0.1
- Loading branch information
yj
committed
Jun 29, 2017
1 parent
60ba97c
commit 23ee8bd
Showing
10 changed files
with
140 additions
and
85 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,56 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion rootProject.ext.compileSdkVersion | ||
buildToolsVersion rootProject.ext.buildToolsVersion | ||
def appVerCode = 1 | ||
def appVerName = "0.0.1" | ||
|
||
compileSdkVersion rootProject.ext.android.compileSdkVersion | ||
buildToolsVersion rootProject.ext.android.buildToolsVersion | ||
|
||
defaultConfig { | ||
applicationId "com.jkb.slidemenulayout" | ||
minSdkVersion rootProject.ext.minSdkVersion | ||
targetSdkVersion rootProject.ext.targetSdkVersion | ||
versionCode appVerCode | ||
versionName appVerName + "-${releaseTime()}" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
applicationId rootProject.ext.app.applicationId | ||
minSdkVersion rootProject.ext.android.minSdkVersion | ||
targetSdkVersion rootProject.ext.android.targetSdkVersion | ||
versionCode rootProject.ext.app.versionCode | ||
versionName rootProject.ext.app.versionName | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility rootProject.ext.sourceCompatibilityVersion | ||
targetCompatibility rootProject.ext.targetCompatibilityVersion | ||
sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion | ||
targetCompatibility rootProject.ext.android.targetCompatibilityVersion | ||
} | ||
|
||
signingConfigs { | ||
debug { | ||
storeFile file(STORE_FILE) | ||
storePassword STORE_PASSWORD | ||
keyAlias KEY_ALIAS | ||
keyPassword KEY_PASSWORD | ||
v2SigningEnabled false | ||
} | ||
release { | ||
storeFile file(STORE_FILE) | ||
storePassword STORE_PASSWORD | ||
keyAlias KEY_ALIAS | ||
keyPassword KEY_PASSWORD | ||
myConfig { | ||
storeFile file(rootProject.ext.store.storeKey) | ||
storePassword rootProject.ext.store.storePassword | ||
keyAlias rootProject.ext.store.keyAlias | ||
keyPassword rootProject.ext.store.keyPassword | ||
v2SigningEnabled false | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false //混淆编译 | ||
shrinkResources false //移除无用的资源文件 | ||
zipAlignEnabled true //是否启用zipAlign压缩 | ||
signingConfig signingConfigs.release | ||
minifyEnabled true | ||
//是否清理无用资源 | ||
shrinkResources true | ||
//是否启用zipAlign压缩 | ||
zipAlignEnabled true | ||
signingConfig signingConfigs.myConfig | ||
versionNameSuffix rootProject.ext.app.versionNameSuffix | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
debug { | ||
minifyEnabled false | ||
zipAlignEnabled false | ||
shrinkResources false | ||
signingConfig signingConfigs.debug | ||
signingConfig signingConfigs.myConfig | ||
versionNameSuffix rootProject.ext.app.versionNameSuffix | ||
} | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'com.android.support:design:25.3.1' | ||
compile 'com.android.support:appcompat-v7:25.3.1' | ||
compile project(':slidemenu') | ||
compile rootProject.ext.dependencies.design | ||
compile project(":slidemenu") | ||
} | ||
|
||
def static releaseTime() { | ||
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+8")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import java.util.regex.Matcher | ||
import java.util.regex.Pattern | ||
|
||
ext { | ||
app = [ | ||
appVerCode : 1, | ||
appVerName : "0.0.1" + "-${releaseTime()}", | ||
applicationId : "com.jkb.supportfragment.demo", | ||
versionNameSuffix: getCurrentVersionSuffix(), | ||
minSdkVersion : 14 | ||
] | ||
|
||
slidemenu = [ | ||
publishCode : 2, | ||
publishVersion: "1.0.1", | ||
|
||
userOrg : 'jkb', | ||
groupId : 'com.justkiddingbaby', | ||
artifactId : 'slidemenu', | ||
desc : 'An Android slide menu layout that support left slide and right slide.', | ||
website : 'https://github.com/YangJing96/SlideMenuLayout' | ||
] | ||
|
||
android = [ | ||
minSdkVersion : 12, | ||
targetSdkVersion : 23, | ||
compileSdkVersion : 23, | ||
buildToolsVersion : "25.0.0", | ||
sourceCompatibilityVersion: JavaVersion.VERSION_1_7, | ||
targetCompatibilityVersion: JavaVersion.VERSION_1_7 | ||
] | ||
|
||
dependencies = [ | ||
appcompatV7: 'com.android.support:appcompat-v7:23.0.1', | ||
design : 'com.android.support:design:24.0.0', | ||
] | ||
|
||
store = [ | ||
storeKey : '../sign/JustKiddingBaby.jks', | ||
storePassword: 'mimajiushiwo', | ||
keyAlias : 'JustKiddingBaby', | ||
keyPassword : 'mimajiushiwo' | ||
] | ||
} | ||
|
||
def static releaseTime() { | ||
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+8")) | ||
} | ||
|
||
def getCurrentVersionSuffix() { | ||
def currentFlavor = getCurrentFlavor() | ||
if (currentFlavor == "prod") { | ||
return "-prod" | ||
} else if (currentFlavor == "uat") { | ||
return "-uat" | ||
} else if (currentFlavor == "dev") { | ||
return "-dev" | ||
} | ||
} | ||
|
||
def getCurrentFlavor() { | ||
String taskRequestName = getGradle().getStartParameter().getTaskRequests().toString() | ||
Pattern pattern; | ||
if (taskRequestName.contains("assemble")) { | ||
pattern = Pattern.compile("assemble(\\w+)(Release|Debug)") | ||
} else { | ||
pattern = Pattern.compile("generate(\\w+)(Release|Debug)") | ||
} | ||
Matcher matcher = pattern.matcher(taskRequestName) | ||
if (matcher.find()) { | ||
return matcher.group(1).toLowerCase() | ||
} else { | ||
return ""; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,45 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.novoda.bintray-release' | ||
|
||
def appVerCode = 1 | ||
def appVerName = "1.0.0" | ||
|
||
publish { | ||
userOrg = 'jkb' | ||
groupId = 'com.justkiddingbaby' | ||
artifactId = 'slidemenu' | ||
publishVersion = appVerName | ||
desc = 'An Android slide menu layout that support left slide and right slide.' | ||
website = 'https://github.com/YangJing96/SlideMenuLayout' | ||
userOrg = rootProject.ext.slidemenu.userOrg | ||
groupId = rootProject.ext.slidemenu.groupId | ||
artifactId = rootProject.ext.slidemenu.artifactId | ||
publishVersion = rootProject.ext.slidemenu.publishVersion | ||
desc = rootProject.ext.slidemenu.desc | ||
website = rootProject.ext.slidemenu.website | ||
} | ||
|
||
android { | ||
compileSdkVersion Integer.parseInt(COMPILE_SDK_VERSION) | ||
buildToolsVersion BUILDTOOLS_VERSION | ||
|
||
compileSdkVersion rootProject.ext.android.compileSdkVersion | ||
buildToolsVersion rootProject.ext.android.buildToolsVersion | ||
|
||
defaultConfig { | ||
minSdkVersion Integer.parseInt(MIN_SDK_VERSION) | ||
targetSdkVersion Integer.parseInt(TARGET_SDK_VERSION) | ||
versionCode appVerCode | ||
versionName appVerName | ||
minSdkVersion rootProject.ext.android.minSdkVersion | ||
targetSdkVersion rootProject.ext.android.targetSdkVersion | ||
versionCode rootProject.ext.slidemenu.publishCode | ||
versionName rootProject.ext.slidemenu.publishVersion | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility rootProject.ext.android.sourceCompatibilityVersion | ||
targetCompatibility rootProject.ext.android.targetCompatibilityVersion | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
|
||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
dependencies { | ||
compile "com.android.support:appcompat-v7:${SUPPORT_LIB_VERSION}" | ||
compile rootProject.ext.dependencies.appcompatV7 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters