mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-02 09:46:51 +01:00
updated build script
This commit is contained in:
parent
379ddbc1cc
commit
6ece3f048c
@ -49,7 +49,7 @@ before_install:
|
||||
|
||||
install:
|
||||
- ./travis/scripts/fetch_private_files.sh
|
||||
- cat ./travis/configs/gradle.properties > ./gradle.properties
|
||||
- cat ./travis/configs/gradle.properties >> ./gradle.properties
|
||||
|
||||
before_script:
|
||||
# Validate if patches work
|
||||
@ -75,7 +75,7 @@ deploy:
|
||||
tags: true
|
||||
# Publish to Google Play store
|
||||
- provider: script
|
||||
script: ./gradlew publishGoogleRelease
|
||||
script: ./gradlew twidere:publishGoogleRelease
|
||||
on:
|
||||
repo: TwidereProject/Twidere-Android
|
||||
tags: true
|
||||
|
55
build.gradle
55
build.gradle
@ -18,6 +18,9 @@ allprojects {
|
||||
projectGroupId = 'org.mariotaku.twidere'
|
||||
projectVersionCode = 387
|
||||
projectVersionName = '3.6.27'
|
||||
|
||||
globalCompileSdkVersion = 26
|
||||
globalBuildToolsVersion = '26.0.1'
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -80,61 +83,9 @@ subprojects {
|
||||
AbstractTask : '0.9.5',
|
||||
Dagger : '2.11',
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
afterEvaluate { project ->
|
||||
|
||||
if (project.hasProperty('android')) {
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
buildToolsVersion '26.0.1'
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
lintConfig rootProject.file('lint.xml')
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/LICENSE'
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/license.txt'
|
||||
exclude 'META-INF/NOTICE'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
exclude 'META-INF/notice.txt'
|
||||
exclude 'META-INF/ASL2.0'
|
||||
}
|
||||
|
||||
def file = rootProject.file('private/signing.properties')
|
||||
if (project.plugins.hasPlugin('com.android.application') && file.exists()) {
|
||||
if (android.hasProperty('buildTypes')) {
|
||||
android.buildTypes.each { buildType ->
|
||||
def cfg = signingConfigs.maybeCreate(buildType.name)
|
||||
loadSigningConfig(cfg, file)
|
||||
buildType.signingConfig = cfg
|
||||
}
|
||||
}
|
||||
if (android.hasProperty('applicationVariants')) {
|
||||
android.applicationVariants.each { buildType ->
|
||||
def cfg = signingConfigs.maybeCreate(buildType.name)
|
||||
loadSigningConfig(cfg, file)
|
||||
buildType.signingConfig = cfg
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
def loadSigningConfig(def cfg, def file) {
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(file.newInputStream())
|
||||
cfg.setStoreFile(rootProject.file(signingProp.get('storeFile')))
|
||||
cfg.setStorePassword((String) signingProp.get('storePassword'))
|
||||
cfg.setKeyAlias((String) signingProp.get('keyAlias'))
|
||||
cfg.setKeyPassword((String) signingProp.get('keyPassword'))
|
||||
}
|
@ -1 +1 @@
|
||||
-Dorg.gradle.jvmargs=-Xmx3.5g
|
||||
org.gradle.jvmargs=-Xmx3584m
|
@ -15,8 +15,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Travis has 4g memory for container-based instances, 7.5g for VM-based instances
|
||||
org.gradle.jvmargs=-Xmx3584m
|
||||
org.gradle.parallel=false
|
||||
kotlin.incremental=false
|
||||
kotlin.compiler.execution.strategy=in-process
|
@ -44,6 +44,10 @@ buildscript {
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion globalCompileSdkVersion
|
||||
buildToolsVersion globalBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
|
@ -22,6 +22,10 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion globalCompileSdkVersion
|
||||
buildToolsVersion globalBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 26
|
||||
|
@ -20,6 +20,10 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion globalCompileSdkVersion
|
||||
buildToolsVersion globalBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.mariotaku.twidere"
|
||||
minSdkVersion 20
|
||||
|
@ -32,6 +32,9 @@ buildscript {
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion globalCompileSdkVersion
|
||||
buildToolsVersion globalBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.mariotaku.twidere"
|
||||
minSdkVersion 14
|
||||
@ -68,13 +71,30 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
twidere {
|
||||
def file = rootProject.file('private/signing.properties')
|
||||
if (!file.exists()) return
|
||||
Properties signingProp = new Properties()
|
||||
signingProp.load(file.newInputStream())
|
||||
storeFile = rootProject.file(signingProp.get('storeFile'))
|
||||
storePassword = (String) signingProp.get('storePassword')
|
||||
keyAlias = (String) signingProp.get('keyAlias')
|
||||
keyPassword = (String) signingProp.get('keyPassword')
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
signingConfig signingConfigs.twidere
|
||||
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
resValue("bool", "debug", "true")
|
||||
}
|
||||
release {
|
||||
signingConfig signingConfigs.twidere
|
||||
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
@ -92,6 +112,19 @@ android {
|
||||
unitTests.returnDefaultValues = true
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
lintConfig rootProject.file('lint.xml')
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/DEPENDENCIES'
|
||||
exclude 'META-INF/README'
|
||||
exclude 'META-INF/INDEX.LIST'
|
||||
exclude 'LICENSE-junit.txt'
|
||||
exclude 'sdk-version.txt'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
Loading…
x
Reference in New Issue
Block a user