mirror of
https://github.com/TwidereProject/Twidere-Android
synced 2025-02-09 00:08:41 +01:00
updated build script
This commit is contained in:
parent
379ddbc1cc
commit
6ece3f048c
@ -49,7 +49,7 @@ before_install:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
- ./travis/scripts/fetch_private_files.sh
|
- ./travis/scripts/fetch_private_files.sh
|
||||||
- cat ./travis/configs/gradle.properties > ./gradle.properties
|
- cat ./travis/configs/gradle.properties >> ./gradle.properties
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
# Validate if patches work
|
# Validate if patches work
|
||||||
@ -75,7 +75,7 @@ deploy:
|
|||||||
tags: true
|
tags: true
|
||||||
# Publish to Google Play store
|
# Publish to Google Play store
|
||||||
- provider: script
|
- provider: script
|
||||||
script: ./gradlew publishGoogleRelease
|
script: ./gradlew twidere:publishGoogleRelease
|
||||||
on:
|
on:
|
||||||
repo: TwidereProject/Twidere-Android
|
repo: TwidereProject/Twidere-Android
|
||||||
tags: true
|
tags: true
|
||||||
|
55
build.gradle
55
build.gradle
@ -18,6 +18,9 @@ allprojects {
|
|||||||
projectGroupId = 'org.mariotaku.twidere'
|
projectGroupId = 'org.mariotaku.twidere'
|
||||||
projectVersionCode = 387
|
projectVersionCode = 387
|
||||||
projectVersionName = '3.6.27'
|
projectVersionName = '3.6.27'
|
||||||
|
|
||||||
|
globalCompileSdkVersion = 26
|
||||||
|
globalBuildToolsVersion = '26.0.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@ -80,61 +83,9 @@ subprojects {
|
|||||||
AbstractTask : '0.9.5',
|
AbstractTask : '0.9.5',
|
||||||
Dagger : '2.11',
|
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
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
org.gradle.parallel=false
|
||||||
kotlin.incremental=false
|
kotlin.incremental=false
|
||||||
kotlin.compiler.execution.strategy=in-process
|
kotlin.compiler.execution.strategy=in-process
|
@ -44,6 +44,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
compileSdkVersion globalCompileSdkVersion
|
||||||
|
buildToolsVersion globalBuildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
|
@ -22,6 +22,10 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
compileSdkVersion globalCompileSdkVersion
|
||||||
|
buildToolsVersion globalBuildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
|
@ -20,6 +20,10 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
compileSdkVersion globalCompileSdkVersion
|
||||||
|
buildToolsVersion globalBuildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.mariotaku.twidere"
|
applicationId "org.mariotaku.twidere"
|
||||||
minSdkVersion 20
|
minSdkVersion 20
|
||||||
|
@ -32,6 +32,9 @@ buildscript {
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
|
compileSdkVersion globalCompileSdkVersion
|
||||||
|
buildToolsVersion globalBuildToolsVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "org.mariotaku.twidere"
|
applicationId "org.mariotaku.twidere"
|
||||||
minSdkVersion 14
|
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 {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
|
signingConfig signingConfigs.twidere
|
||||||
|
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
shrinkResources false
|
shrinkResources false
|
||||||
resValue("bool", "debug", "true")
|
resValue("bool", "debug", "true")
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
signingConfig signingConfigs.twidere
|
||||||
|
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
shrinkResources false
|
shrinkResources false
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
@ -92,6 +112,19 @@ android {
|
|||||||
unitTests.returnDefaultValues = true
|
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 {
|
repositories {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user