diff --git a/README.md b/README.md index 6a9ec45ef0e563b0e975c02ba43a782c43242500..5cc125df058a969ea8188493ba6b77aaf9e032c8 100644 --- a/README.md +++ b/README.md @@ -95,11 +95,13 @@ This app requires different modules that must be built indivually and pushed to modules must be build and deployed in the following order: -- [privacymodulesapi](../../../e_privacycentral_privacymodulesapi) -- [privacymodulese](../../../e_privacycentral_privacymodulese) -- [privacymoduletor](../../../e_privacycentral_privacymoduletor) -- [privacymoduletrackerfilter](../../../e_privacycentral_privacymoduletrackerfilter) - +- privacymodule-api : + - ./gradlew :privacymodule-api:assembleRelease + - ./gradlew --console=verbose publishToMavenLocal // To make it available locally for dev. + - ./gradlew --console=verbose publish // To publish it on gitlab for release. +- [privacymodule-e](../../../e_privacycentral_privacymodulese) +- [privacymodule-tor](../../../e_privacycentral_privacymoduletor) +- [app] ## Build If you'd like to build PrivacyCentral locally, you should be able to just clone and build with no issues. @@ -147,7 +149,7 @@ PrivacyCentral needs to be installed as system app and whitelisting in order to ### To run apk on stock android devices You can simply install the apk. Keep in that mind all features won't be available on stock android devices. -> Volla!!!, PrivacyCentral is installed successfully in your device. +> Voila !!!, PrivacyCentral is installed successfully in your device. # Distribution This project can be distributed as prebuilt apk with /e/OS or it can be published on other app stores for non /e/OS devices. diff --git a/app/build.gradle b/app/build.gradle index 61ee623f8732de0b84823b8003468ff469dcdac1..9cfc65b34bb2fdc8d25618e6714ff582b611ed81 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,20 @@ +/* + * 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 . + */ + plugins { id 'com.android.application' id 'kotlin-android' @@ -111,17 +128,11 @@ android { } dependencies { - implementation project(':api') - + implementation project(':privacymodule-api') standaloneImplementation project(':permissionsstandalone') - e29Implementation('foundation.e:privacymodule.e-29:1.2.0') { - exclude group: 'foundation.e', module: 'privacymodule.api' - } - e30Implementation('foundation.e:privacymodule.e-30:1.2.0') { - exclude group: 'foundation.e', module: 'privacymodule.api' - } - + e29Implementation 'foundation.e:privacymodule-e-29:1.2.0' + e30Implementation 'foundation.e:privacymodule-e-30:1.2.0' implementation project(':fakelocation') e29CompileOnly files('libs/e-ui-sdk-1.0.1-q.jar') diff --git a/build.gradle b/build.gradle index 5222057fed9e3b54bf5776daa3e04ac42d853d4d..ec8cf145a45749d17429eb862abedf66ffe97f3f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,20 @@ +/* + * 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 . + */ + import foundation.e.privacycentral.buildsrc.DependencyUpdates import foundation.e.privacycentral.buildsrc.ReleaseType diff --git a/dependencies.gradle b/dependencies.gradle index ed329c786658529c5c56b0e8dd4831edf451b6ac..6c4acb3101027a26a1bed873db264e13a06349e5 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,3 +1,20 @@ +/* + * 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 . + */ + def libs = [:] ext.Libs = libs diff --git a/fakelocation/fakelocationdemo/build.gradle b/fakelocation/fakelocationdemo/build.gradle index 12ed2e797bb5156c00e7c384de7dbc771f7f08a4..c182b2f8b977e84dc1f08cf54164a188ccfbe2c8 100644 --- a/fakelocation/fakelocationdemo/build.gradle +++ b/fakelocation/fakelocationdemo/build.gradle @@ -54,7 +54,7 @@ android { } dependencies { - implementation project(':api') + implementation project(':privacymodule-api') implementation project(':fakelocation') implementation project(':permissionsstandalone') diff --git a/permissionsstandalone/build.gradle b/permissionsstandalone/build.gradle index aadb84f8149dd0b49a9dab3ac4c6b31c7a537417..ef03f2bf6045ac575ee4bc1792b5fbc8aee83d5e 100644 --- a/permissionsstandalone/build.gradle +++ b/permissionsstandalone/build.gradle @@ -51,8 +51,8 @@ dependencies { Libs.AndroidX.coreKtx, Libs.Coroutines.core ) + implementation project(':privacymodule-api') - implementation project(':api') testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' diff --git a/api/.gitignore b/privacymodule-api/.gitignore similarity index 100% rename from api/.gitignore rename to privacymodule-api/.gitignore diff --git a/api/build.gradle b/privacymodule-api/build.gradle similarity index 72% rename from api/build.gradle rename to privacymodule-api/build.gradle index b8ced30765f39c78d638ae09aec3ee3a6e78e394..c0b1303dfdddd13edcf32ff9ec7ff22560251fc2 100644 --- a/api/build.gradle +++ b/privacymodule-api/build.gradle @@ -1,7 +1,26 @@ +/* + * 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 . + */ + apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'maven-publish' +group 'foundation.e' + android { compileSdkVersion buildConfig.compileSdk @@ -40,9 +59,9 @@ publishing { maven(MavenPublication) { groupId 'foundation.e' //You can either define these here or get them from project conf elsewhere - artifactId 'privacymodule.api' + artifactId 'privacymodule-api' version buildConfig.version.name - artifact "$buildDir/outputs/aar/api-release.aar" + artifact "$buildDir/outputs/aar/privacymodule-api-release.aar" //aar artifact you want to publish //generate pom nodes for dependencies @@ -73,7 +92,10 @@ publishing { } } else { maven { - url "https://gitlab.e.foundation/api/v4/projects/900/packages/maven" +// url "https://gitlab.e.foundation/api/v4/projects/900/packages/maven" + // Use privacymodule-e repository (id = 781) for now, + // because repository not activated on Advanced Privacy (id = 900) + url "https://gitlab.e.foundation/api/v4/projects/781/packages/maven" credentials(HttpHeaderCredentials) { name = "Private-Token" value = gitLabPrivateToken diff --git a/api/consumer-rules.pro b/privacymodule-api/consumer-rules.pro similarity index 100% rename from api/consumer-rules.pro rename to privacymodule-api/consumer-rules.pro diff --git a/api/proguard-rules.pro b/privacymodule-api/proguard-rules.pro similarity index 100% rename from api/proguard-rules.pro rename to privacymodule-api/proguard-rules.pro diff --git a/api/src/main/AndroidManifest.xml b/privacymodule-api/src/main/AndroidManifest.xml similarity index 100% rename from api/src/main/AndroidManifest.xml rename to privacymodule-api/src/main/AndroidManifest.xml diff --git a/api/src/main/java/foundation/e/privacymodules/DependencyInjector.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/DependencyInjector.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/DependencyInjector.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/DependencyInjector.kt diff --git a/api/src/main/java/foundation/e/privacymodules/location/IFakeLocationModule.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/location/IFakeLocationModule.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/location/IFakeLocationModule.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/location/IFakeLocationModule.kt diff --git a/api/src/main/java/foundation/e/privacymodules/permissions/APermissionsPrivacyModule.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/APermissionsPrivacyModule.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/permissions/APermissionsPrivacyModule.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/APermissionsPrivacyModule.kt diff --git a/api/src/main/java/foundation/e/privacymodules/permissions/IPermissionsPrivacyModule.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/IPermissionsPrivacyModule.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/permissions/IPermissionsPrivacyModule.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/IPermissionsPrivacyModule.kt diff --git a/api/src/main/java/foundation/e/privacymodules/permissions/data/AppOpModes.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/data/AppOpModes.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/permissions/data/AppOpModes.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/data/AppOpModes.kt diff --git a/api/src/main/java/foundation/e/privacymodules/permissions/data/ApplicationDescription.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/data/ApplicationDescription.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/permissions/data/ApplicationDescription.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/data/ApplicationDescription.kt diff --git a/api/src/main/java/foundation/e/privacymodules/permissions/data/PermissionDescription.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/data/PermissionDescription.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/permissions/data/PermissionDescription.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/permissions/data/PermissionDescription.kt diff --git a/api/src/main/java/foundation/e/privacymodules/trackers/IBlockTrackersPrivacyModule.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/IBlockTrackersPrivacyModule.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/trackers/IBlockTrackersPrivacyModule.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/IBlockTrackersPrivacyModule.kt diff --git a/api/src/main/java/foundation/e/privacymodules/trackers/IDNSBlocker.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/IDNSBlocker.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/trackers/IDNSBlocker.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/IDNSBlocker.kt diff --git a/api/src/main/java/foundation/e/privacymodules/trackers/ITrackTrackersPrivacyModule.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/ITrackTrackersPrivacyModule.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/trackers/ITrackTrackersPrivacyModule.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/ITrackTrackersPrivacyModule.kt diff --git a/api/src/main/java/foundation/e/privacymodules/trackers/Tracker.kt b/privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/Tracker.kt similarity index 100% rename from api/src/main/java/foundation/e/privacymodules/trackers/Tracker.kt rename to privacymodule-api/src/main/java/foundation/e/privacymodules/trackers/Tracker.kt diff --git a/settings.gradle b/settings.gradle index 24b6eefdf6bd5dac2ce8125b101501452d1a2666..547bbd1400d8d286cbdd8f6481fd4732311b79f5 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,6 +2,6 @@ include ':app' rootProject.name = "PrivacyCentralApp" include ':fakelocation' include ':fakelocation:fakelocationdemo' -include ':api' +include ':privacymodule-api' include ':permissionsstandalone' include ':trackers' diff --git a/trackers/build.gradle b/trackers/build.gradle index 51f8448b91b13398bac27c9e63d094d1a629a079..dec05ff1e480efa9fc207bc2a16fb31618a6a3fb 100644 --- a/trackers/build.gradle +++ b/trackers/build.gradle @@ -40,6 +40,7 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } } -dependencies{ - implementation project(":api") + +dependencies { + implementation project(':privacymodule-api') }