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

Verified Commit 99b7d048 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

First working version, including library to use it

parent 1d6d7ca6
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
language: android
sudo: false
git:
  submodules: false
before_install:
  - git submodule update --init --recursive
before_script:
  - echo sdk.dir $ANDROID_HOME > local.properties
script:
  - export JAVA_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
  - export TERM=dumb
  - export JAVA_OPTS="-XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m"
  - ./gradlew build
  - echo sdk.dir $ANDROID_HOME > local.properties
  - jdk_switcher use oraclejdk8
  - ./gradlew assemble
android:
  components:
  - platform-tools
  - tools
  - build-tools-23.0.3
  - android-23
  - build-tools-24.0.2
  - android-24
  - extra-android-m2repository
before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
+4 −4
Original line number Diff line number Diff line
@@ -19,19 +19,19 @@ buildscript {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
        classpath 'com.android.tools.build:gradle:2.2.0'
    }
}

allprojects {
    apply plugin: 'idea'
    ext.androidBuildVersionTools = "23.0.3"
    ext.androidBuildVersionTools = "24.0.2"
    ext.isReleaseVersion = false
}

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

def androidTargetSdk() { return 23 }
def androidTargetSdk() { return 24 }

def androidMinSdk() { return 10 }

+39 −0
Original line number Diff line number Diff line
apply plugin: 'com.android.library'

dependencies {
    compile 'org.microg:safe-parcel:1.4.0'
}

String getMyVersionName() {
    def stdout = new ByteArrayOutputStream()
    if (rootProject.file("gradlew").exists())
        exec {
            commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout
        }
    else // automatic build system, don't tag dirty
        exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout }
    return stdout.toString().trim().substring(1)
}

int getMyVersionCode() {
    def stdout = new ByteArrayOutputStream()
    exec {
        commandLine 'git', 'rev-list', '--count', "HEAD"
        standardOutput = stdout
    }
    return Integer.parseInt(stdout.toString().trim())
}

android {
    compileSdkVersion androidCompileSdk()
    buildToolsVersion "$androidBuildVersionTools"

    defaultConfig {
        versionName getMyVersionName()
        versionCode getMyVersionCode()
    }
}

if (file('user.gradle').exists()) {
    apply from: 'user.gradle'
}
+7 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<manifest package="org.microg.gms.droidguard.lib"
          xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-sdk android:minSdkVersion="9"/>
    <uses-permission android:name="android.permission.INTERNET"/>
</manifest>
+8 −0
Original line number Diff line number Diff line
package org.microg.gms.droidguard;

import org.microg.gms.droidguard.IRemoteDroidGuardCallback;
import org.microg.gms.droidguard.RemoteDroidGuardRequest;

interface IRemoteDroidGuard {
    void guard(IRemoteDroidGuardCallback callback, String packageName, String type, in Bundle data);
    void guard(IRemoteDroidGuardCallback callbach, in RemoteDroidGuardRequest request) = 0;
}
 No newline at end of file
Loading