Upgrade p4a #19

Open
jessopb wants to merge 36 commits from upgrade_p4a into master
5 changed files with 280 additions and 0 deletions
Showing only changes of commit 65b1c8e94e - Show all commits

View file

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="16dp"
tools:context="io.lbry.browser.ServiceControlActivity"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="5">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="3"
android:text="@string/service_status"
/>
<TextView
android:id="@+id/text_service_status"
android:textColor="@color/red"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="8dp"
android:gravity="right"
android:layout_weight="2"
android:text="@string/stopped"
/>
</LinearLayout>
<Button
android:id="@+id/btn_start_stop"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginTop="12dp"
android:text="@string/start"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_marginTop="24dp"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="3">
<TextView
android:layout_weight="2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="20sp"
android:layout_gravity="center_vertical"
android:text="@string/unit_tests"
/>
<Button
android:id="@+id/btn_run_tests"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right|center_vertical"
android:text="@string/run_tests"/>
</LinearLayout>
<ScrollView
android:layout_marginTop="12dp"
android:padding="6dp"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/test_runner_output"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="12sp"
/>
</ScrollView>
</LinearLayout>
</LinearLayout>

View file

@ -0,0 +1,171 @@
// 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 "arm64-v8a"
}
}
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 'lbrysdk64'
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 %}
}

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#40B89A</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FFFFFF</color>
<color name="red">#FF0000</color>
<color name="green">#00C000</color>
<color name="white">#FFFFFF</color>
<color name="lbryGreen">#2F9176</color>
<color name="nextLbryGreen">#38D9A9</color>
</resources>

View file

@ -0,0 +1,10 @@
android.useAndroidX=true
android.enableJetifier=true
ossrhUsername={{ env["SONATYPE_USERNAME"] }}
ossrhPassword={{ env["SONATYPE_PASSWORD"] }}
sonatypeStagingProfileId={{ env["SONATYPE_STAGING_PROFILE_ID"] }}
signing.keyId={{ env["NEXUS_SIGNING_KEY_ID"] }}
signing.password={{ env["NEXUS_SIGNING_KEY_PASSWORD"] }}
signing.secretKeyRingFile={{ env["NEXUS_SIGNING_KEYRING_FILE"] }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB