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

Commit 1b9c519e authored by Guillaume Jacquart's avatar Guillaume Jacquart
Browse files

Merge branch '2-simplify_source_module_tree' into 'main'

2-Simplify sources modules tree

See merge request !79
parents 12510a55 c8d88ec3
Loading
Loading
Loading
Loading
Loading

api/.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
/build
 No newline at end of file

api/build.gradle

0 → 100644
+90 −0
Original line number Diff line number Diff line
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'

android {
    compileSdkVersion buildConfig.compileSdk

    defaultConfig {
        minSdkVersion buildConfig.minSdk
        targetSdkVersion buildConfig.targetSdk

        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

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

dependencies {
    implementation(
        Libs.Kotlin.stdlib,
        Libs.AndroidX.coreKtxAPI29,
        Libs.Coroutines.core
    )
}

//url "https://gitlab.e.foundation/api/v4/groups/e/privacy-central/-/packages/maven"

publishing {
    publications {
        maven(MavenPublication) {
            groupId 'foundation.e'
            //You can either define these here or get them from project conf elsewhere
            artifactId 'privacymodule.api'
            version buildConfig.version.name
            artifact "$buildDir/outputs/aar/api-release.aar"
            //aar artifact you want to publish

            //generate pom nodes for dependencies
            pom.withXml {
                def dependenciesNode = asNode().appendNode('dependencies')
                configurations.implementation.allDependencies.each { dependency ->
                    if (dependency.name != 'unspecified') {
                        def dependencyNode = dependenciesNode.appendNode('dependency')
                        dependencyNode.appendNode('groupId', dependency.group)
                        dependencyNode.appendNode('artifactId', dependency.name)
                        dependencyNode.appendNode('version', dependency.version)
                    }
                }
            }
            repositories {
                def ciJobToken = System.getenv("CI_JOB_TOKEN")
                def ciApiV4Url = System.getenv("CI_API_V4_URL")
                if (ciJobToken != null) {
                    maven {
                        url "${ciApiV4Url}/projects/900/packages/maven"
                        credentials(HttpHeaderCredentials) {
                            name = 'Job-Token'
                            value = ciJobToken
                        }
                        authentication {
                            header(HttpHeaderAuthentication)
                        }
                    }
                } else {
                    maven {
                        url "https://gitlab.e.foundation/api/v4/projects/900/packages/maven"
                        credentials(HttpHeaderCredentials) {
                            name = "Private-Token"
                            value = gitLabPrivateToken
                            // the variable resides in ~/.gradle/gradle.properties
                        }
                        authentication {
                            header(HttpHeaderAuthentication)
                        }
                    }
                }
            }
        }
    }
}

api/consumer-rules.pro

0 → 100644
+0 −0

Empty file added.

api/proguard-rules.pro

0 → 100644
+21 −0
Original line number Diff line number Diff line
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
 No newline at end of file
+21 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright  (C) 2022 E FOUNDATION

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="foundation.e.privacymodules.api"
    >
</manifest>
 No newline at end of file
Loading