Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa8c6452 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '5266-r-implement-split-install-skeleton' into 'master'

Implement SplitInstallService skeleton

See merge request !1
parents 3f047dc3 18baa8af
Loading
Loading
Loading
Loading
+12 −23
Original line number Diff line number Diff line
language: android
sudo: false
git:
  submodules: false
before_install:
  - git submodule update --init --recursive
language: java
jdk: openjdk8
install:
  - mkdir $HOME/android-cmdline-tools
  - curl https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip > $HOME/android-cmdline-tools/cmdline-tools.zip
  - unzip -qq -n $HOME/android-cmdline-tools/cmdline-tools.zip -d $HOME/android-cmdline-tools
  - echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platform-tools'
  - echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'build-tools;29.0.3'
  - echo y | $HOME/android-cmdline-tools/tools/bin/sdkmanager --sdk_root=$HOME/android-sdk 'platforms;android-30'
env:
  - ANDROID_HOME=$HOME/android-sdk TERM=dumb JAVA_OPTS="-Xmx2048m"
before_script:
  - echo sdk.dir $ANDROID_HOME > local.properties
script:
  - jdk_switcher use oraclejdk8
  - export TERM=dumb
  - export JAVA_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
  - ./gradlew build
android:
  components:
  - tools
  - platform-tools
  - build-tools-24.0.3
  - android-24
  - extra-android-m2repository
before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/
  - ./gradlew --no-daemon build
+7 −10
Original line number Diff line number Diff line
@@ -15,22 +15,23 @@
 */

buildscript {
    ext.kotlin_version = '1.6.21'
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
        classpath 'com.android.tools.build:gradle:3.6.3'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    apply plugin: 'idea'
    ext.androidBuildVersionTools = "24.0.3"
    ext.isReleaseVersion = false
    ext.androidBuildVersionTools = "29.0.3"
}

def androidCompileSdk() { return 24 }
def androidCompileSdk() { return 30 }

def androidTargetSdk() { return 24 }

@@ -55,11 +56,7 @@ subprojects {
    group = 'org.microg'
    repositories {
        jcenter()
    }

    tasks.withType(JavaCompile) {
        sourceCompatibility = JavaVersion.VERSION_1_7
        targetCompatibility = JavaVersion.VERSION_1_7
        google()
    }
}
+9 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

String getMyVersionName() {
    def stdout = new ByteArrayOutputStream()
@@ -46,10 +47,17 @@ android {
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

if (file('user.gradle').exists()) {
    apply from: 'user.gradle'
}
repositories {
    mavenCentral()
}
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
+10 −5
Original line number Diff line number Diff line
@@ -18,12 +18,10 @@
<manifest package="com.android.vending"
          xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="23"/>

    <permission android:name="com.android.vending.CHECK_LICENSE" android:protectionLevel="normal"/>
    <uses-permission android:name="android.permission.FAKE_PACKAGE_SIGNATURE"/>
    <application
        android:forceQueryable="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name">
        <meta-data
@@ -33,7 +31,7 @@
        <activity
            android:name=".GrantFakeSignaturePermissionActivity"
            android:exported="true"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
            android:theme="@style/Theme.Dialog.NoActionBar"/>

        <service
            android:name="com.android.vending.billing.InAppBillingService" >
@@ -41,5 +39,12 @@
                <action android:name="com.android.vending.billing.InAppBillingService.BIND" />
            </intent-filter>
        </service>

        <service
            android:name="com.android.vending.SplitInstallService" >
            <intent-filter>
                <action android:name="com.google.android.play.core.splitinstall.BIND_SPLIT_INSTALL_SERVICE" />
            </intent-filter>
        </service>
    </application>
</manifest>
+22 −11
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ interface IInAppBillingService {
     *        and "subs" for subscriptions)
     * @return RESULT_OK(0) on success and appropriate response code on failures.
     */
    int isBillingSupported(int apiVersion, String packageName, String type);
    int isBillingSupported(int apiVersion, String packageName, String type) = 0;

    /**
     * Provides details of a list of SKUs
@@ -78,7 +78,7 @@ interface IInAppBillingService {
     *                           "title : "Example Title",
     *                           "description" : "This is an example description" }'
     */
    Bundle getSkuDetails(int apiVersion, String packageName, String type, in Bundle skusBundle);
    Bundle getSkuDetails(int apiVersion, String packageName, String type, in Bundle skusBundle) = 1;

    /**
     * Returns a pending intent to launch the purchase flow for an in-app item by providing a SKU,
@@ -111,7 +111,7 @@ interface IInAppBillingService {
     *                                  TODO: change this to app-specific keys.
     */
    Bundle getBuyIntent(int apiVersion, String packageName, String sku, String type,
        String developerPayload);
        String developerPayload) = 2;

    /**
     * Returns the current SKUs owned by the user of the type and package name specified along with
@@ -137,7 +137,7 @@ interface IInAppBillingService {
     *                                      next set of in-app purchases. Only set if the
     *                                      user has more owned skus than the current list.
     */
    Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken);
    Bundle getPurchases(int apiVersion, String packageName, String type, String continuationToken) = 3;

    /**
     * Consume the last purchase of the given SKU. This will result in this item being removed
@@ -148,12 +148,7 @@ interface IInAppBillingService {
     *        to be consumed
     * @return RESULT_OK(0) if consumption succeeded, appropriate response codes on failures.
     */
    int consumePurchase(int apiVersion, String packageName, String purchaseToken);

    /**
     * This API is currently under development.
     */
    int stub(int apiVersion, String packageName, String type);
    int consumePurchase(int apiVersion, String packageName, String purchaseToken) = 4;

    /**
     * Returns a pending intent to launch the purchase flow for upgrading or downgrading a
@@ -188,5 +183,21 @@ interface IInAppBillingService {
     *                                  TODO: change this to app-specific keys.
     */
    Bundle getBuyIntentToReplaceSkus(int apiVersion, String packageName,
        in List<String> oldSkus, String newSku, String type, String developerPayload);
        in List<String> oldSkus, String newSku, String type, String developerPayload) = 6;

    Bundle getBuyIntentV6(int apiVersion, String packageName, String sku, String type, String developerPayload, in Bundle extras) = 7;

    Bundle getPurchasesV6(int apiVersion, String packageName, String type, String continuationToken, in Bundle extras) = 8;

    int isBillingSupportedV7(int apiVersion, String packageName, String type, in Bundle extras) = 9;

    Bundle getPurchasesV9(int apiVersion, String packageName, String type, String continuationToken, in Bundle extras) = 10;

    Bundle consumePurchaseV9(int apiVersion, String packageName, String purchaseToken, in Bundle extras) = 11;

    Bundle getPriceChangeConfirmationIntent(int apiVersion, String packageName, String sku, String type, in Bundle extras) = 800;

    Bundle getSkuDetailsV10(int apiVersion, String packageName, String type, in Bundle skuBundle, in Bundle extras) = 900;

    Bundle acknowledgePurchase(int apiVersion, String packageName, String purchaseToken, in Bundle extras) = 901;
}
Loading