From 0856ebb8891ea80cdbdf4ded8c5e72969e39392b Mon Sep 17 00:00:00 2001 From: aminecmi Date: Mon, 14 Nov 2022 13:10:17 +0100 Subject: [PATCH] Removing matomo url from build config. --- .drone.yml | 12 ++-------- .github/CONTRIBUTING.md | 24 ------------------- .../apps/readerforselfossv2/android/MyApp.kt | 2 +- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1b750a2..c1d14bd 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,7 @@ steps: commands: - echo "---------------------------------------------------------" - echo "Configure gradle..." - - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nmatomoUrl=\"$MATOMO_URL\"\nmatomoSite=\"$MATOMO_SITE\"\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties + - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties - echo "---------------------------------------------------------" - echo "Analysing..." - ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN @@ -24,10 +24,6 @@ steps: from_secret: sonarScannerHostUrl SONAR_LOGIN: from_secret: sonarScannerLogin - MATOMO_URL: - from_secret: matomoUrl - MATOMO_SITE: - from_secret: matomoSite trigger: event: - push @@ -94,7 +90,7 @@ steps: commands: - echo "---------------------------------------------------------" - echo "Configure gradle..." - - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\nmatomoUrl=\"$MATOMO_URL\"\nmatomoSite=\"$MATOMO_SITE\"\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties + - mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties - echo "---------------------------------------------------------" - echo "Generate APK" - ./gradlew :androidApp:assembleGithubConfigRelease -P pushCache=false @@ -115,10 +111,6 @@ steps: from_secret: keyPass YOUR_KEY_ALIAS: from_secret: keyAlias - MATOMO_URL: - from_secret: matomoUrl - MATOMO_SITE: - from_secret: matomoSite - name: gitea_release image: plugins/gitea-release diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 415e10f..caad388 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -46,27 +46,3 @@ Always check if the web version of your instance is working. I won't provide any selfoss instance url. If you want to help, but to not have one, you'll have to install one, and use it. All the details to need are [here](https://selfoss.aditu.de/). - -# Build the project - -You can directly import this project into IntellIJ/Android Studio. - -You'll have to: - -- Define some parameters either in `~/.gradle/gradle.properties` or as gradle parameters (see the examples) - - - matomoUrl and matomoSite: url and siteId for a matomo instance - -### Examples: -#### Inside ~/.gradle/gradle.properties - -``` -matomoUrl="URL" # It can be empty. -matomoSite="1" # It can be empty, but needs to be an integer -``` - -#### As gradle parameters - -``` -./gradlew .... -P matomoUrl="URL" -P matomoSite="1" -``` diff --git a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt index 620cfea..840d206 100644 --- a/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt +++ b/androidApp/src/main/java/bou/amine/apps/readerforselfossv2/android/MyApp.kt @@ -43,7 +43,7 @@ class MyApp : MultiDexApplication(), DIAware { bind() with singleton { Repository(instance(), instance(), isConnectionAvailable, instance()) } bind() with singleton { ConnectivityStatus(applicationContext) } bind() with singleton { AppViewModel(repository = instance()) } - bind() with singleton { TrackerBuilder.createDefault(BuildConfig.MATOMO_URL, BuildConfig.MATOMO_SITE.toInt()).build( + bind() with singleton { TrackerBuilder.createDefault("https://matomo.amine-louveau.fr/matomo.php", 4).build( Matomo.getInstance(applicationContext)) } }