173 lines
4.3 KiB
Text
173 lines
4.3 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.6.4'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
plugins {
|
||
|
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
|
||
|
}
|
||
|
|
||
|
allprojects {
|
||
|
repositories {
|
||
|
jcenter()
|
||
|
maven {
|
||
|
url 'https://maven.google.com'
|
||
|
}
|
||
|
flatDir {
|
||
|
dirs 'libs'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
apply plugin: 'com.android.library'
|
||
|
apply plugin: 'maven-publish'
|
||
|
apply plugin: 'signing'
|
||
|
|
||
|
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 }}'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
nexusPublishing {
|
||
|
repositories {
|
||
|
sonatype {
|
||
|
stagingProfileId = sonatypeStagingProfileId
|
||
|
username = ossrhUsername
|
||
|
password = ossrhPassword
|
||
|
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
|
||
|
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
afterEvaluate {
|
||
|
publishing {
|
||
|
publications {
|
||
|
release(MavenPublication) {
|
||
|
groupId 'io.lbry'
|
||
|
artifactId 'lbrysdk32'
|
||
|
version '{{ args.version }}'
|
||
|
|
||
|
from components.release
|
||
|
|
||
|
pom {
|
||
|
name = 'LBRY SDK for Android'
|
||
|
description = 'The LBRY SDK packaged as an Android AAR'
|
||
|
url = 'https://github.com/lbryio/lbry-android-sdk'
|
||
|
licenses {
|
||
|
license {
|
||
|
name = 'MIT License'
|
||
|
url = 'https://raw.githubusercontent.com/lbryio/lbry-android-sdk/master/LICENSE'
|
||
|
}
|
||
|
}
|
||
|
developers {
|
||
|
developer {
|
||
|
id = 'akinwale'
|
||
|
name = 'Akinwale Ariwodola'
|
||
|
email = 'akinwale@lbry.com'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
scm {
|
||
|
url = 'https://github.com/lbryio/lbry-android-sdk'
|
||
|
connection = 'scm:git:github.com/lbryio/lbry-android-sdk.git'
|
||
|
developerConnection = 'scm:git:ssh://github.com/lbryio/lbry-android-sdk.git'
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
signing {
|
||
|
sign publishing.publications
|
||
|
}
|
||
|
|
||
|
dependencies {
|
||
|
{%- for aar in aars %}
|
||
|
compile(name: '{{ aar }}', ext: 'aar')
|
||
|
{%- endfor -%}
|
||
|
{%- if args.depends -%}
|
||
|
{%- for depend in args.depends %}
|
||
|
compile '{{ depend }}'
|
||
|
{%- endfor %}
|
||
|
{%- endif %}
|
||
|
}
|