98d923f25c
* configure maven central publishing * remove bintrayUpload argument * use modifyPom to update artifactId
128 lines
2.9 KiB
Text
128 lines
2.9 KiB
Text
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
mavenCentral()
|
|
maven { url "https://jitpack.io" }
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
|
classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
jcenter()
|
|
maven {
|
|
url 'https://maven.google.com'
|
|
}
|
|
flatDir {
|
|
dirs 'libs'
|
|
}
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'com.bmuschko.nexus'
|
|
|
|
archivesBaseName = 'lbrysdk'
|
|
group = "io.lbry"
|
|
version = "{{ args.version }}"
|
|
|
|
android {
|
|
compileSdkVersion {{ android_api }}
|
|
buildToolsVersion '{{ build_tools_version }}'
|
|
defaultConfig {
|
|
minSdkVersion {{ args.min_sdk_version }}
|
|
targetSdkVersion {{ android_api }}
|
|
versionCode {{ args.numeric_version }} * 10 + 2
|
|
versionName '{{ args.version }}'
|
|
multiDexEnabled true
|
|
|
|
ndk {
|
|
abiFilters "armeabi-v7a"
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility 1.8
|
|
targetCompatibility 1.8
|
|
}
|
|
|
|
dexOptions {
|
|
jumboMode true
|
|
}
|
|
|
|
{% if args.sign -%}
|
|
signingConfigs {
|
|
release {
|
|
storeFile file(System.getenv("P4A_RELEASE_KEYSTORE"))
|
|
keyAlias System.getenv("P4A_RELEASE_KEYALIAS")
|
|
storePassword System.getenv("P4A_RELEASE_KEYSTORE_PASSWD")
|
|
keyPassword System.getenv("P4A_RELEASE_KEYALIAS_PASSWD")
|
|
}
|
|
}
|
|
{%- endif %}
|
|
|
|
buildTypes {
|
|
debug {
|
|
}
|
|
release {
|
|
{% if args.sign -%}
|
|
signingConfig signingConfigs.release
|
|
{%- endif %}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
jniLibs.srcDir 'libs'
|
|
}
|
|
}
|
|
}
|
|
|
|
ext {
|
|
compileSdkVersion = {{ android_api }}
|
|
buildToolsVersion = '{{ build_tools_version }}'
|
|
minSdkVersion = {{ args.min_sdk_version }}
|
|
targetSdkVersion = {{ android_api }}
|
|
}
|
|
|
|
subprojects {
|
|
afterEvaluate {project ->
|
|
if (project.hasProperty("android")) {
|
|
android {
|
|
compileSdkVersion {{ android_api }}
|
|
buildToolsVersion '{{ build_tools_version }}'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
nexus {
|
|
sign = true
|
|
repositoryUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
snapshotRepositoryUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
|
}
|
|
|
|
modifyPom {
|
|
project {
|
|
name 'LBRY SDK for Android'
|
|
description 'The LBRY SDK packaged as an Android AAR'
|
|
groupId 'io.lbry'
|
|
artifactId 'lbrysdk32'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
{%- for aar in aars %}
|
|
compile(name: '{{ aar }}', ext: 'aar')
|
|
{%- endfor -%}
|
|
{%- if args.depends -%}
|
|
{%- for depend in args.depends %}
|
|
compile '{{ depend }}'
|
|
{%- endfor %}
|
|
{%- endif %}
|
|
}
|