From 8f060620650b42eb976819c35de5895b060d6fde Mon Sep 17 00:00:00 2001 From: Thomas Mengelatte Date: Fri, 6 Dec 2024 10:34:18 +0100 Subject: [PATCH] all: update agp 8.7.3 and remove sonar --- Makefile | 10 +---- build.gradle | 7 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- mixpanel-dispatcher/build.gradle | 9 ++--- mixpanel-dispatcher/sonar.gradle | 39 ------------------- .../src/main/AndroidManifest.xml | 3 +- 6 files changed, 10 insertions(+), 60 deletions(-) delete mode 100644 mixpanel-dispatcher/sonar.gradle diff --git a/Makefile b/Makefile index 9a7bffd..7bce632 100644 --- a/Makefile +++ b/Makefile @@ -17,14 +17,6 @@ test-coverage: ./gradlew testDebugCoverageUnitTest && \ awk -F"," '{ instructions += $$4 + $$5; covered += $$5 } END { print covered, "/", instructions, "instructions covered"; print "Total", 100*covered/instructions "% covered" }' mixpanel-dispatcher/build/test-results/jacoco.csv -check-token: -ifndef SONAR_TOKEN - $(error SONAR_TOKEN is undefined) -endif - -sonar: check-token - ./gradlew sonarqube - lint: ./gradlew lintDebug @@ -33,4 +25,4 @@ ci: clean lint test-coverage aar publish: aar ./gradlew mixpanel-dispatcher:publish -.PHONY: ci sonar check-token \ No newline at end of file +.PHONY: ci \ No newline at end of file diff --git a/build.gradle b/build.gradle index 29053fb..53afc88 100644 --- a/build.gradle +++ b/build.gradle @@ -3,11 +3,10 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:3.6.0' - classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.8' + classpath 'com.android.tools.build:gradle:8.7.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -16,8 +15,8 @@ buildscript { allprojects { repositories { google() - jcenter() mavenLocal() + mavenCentral() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d5f3218..1fe6e94 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip diff --git a/mixpanel-dispatcher/build.gradle b/mixpanel-dispatcher/build.gradle index 3614d20..da14d02 100644 --- a/mixpanel-dispatcher/build.gradle +++ b/mixpanel-dispatcher/build.gradle @@ -7,11 +7,11 @@ ext { } android { - compileSdkVersion 30 + namespace "com.batch.android.dispatcher.mixpanel" + compileSdk 35 defaultConfig { - minSdkVersion 15 - targetSdkVersion 30 + minSdkVersion 21 versionCode 2 versionName "2.0.0" @@ -54,5 +54,4 @@ dependencies { } apply from: 'maven-publish.gradle' -apply from: 'jacoco.gradle' -apply from: 'sonar.gradle' \ No newline at end of file +apply from: 'jacoco.gradle' \ No newline at end of file diff --git a/mixpanel-dispatcher/sonar.gradle b/mixpanel-dispatcher/sonar.gradle deleted file mode 100644 index a32e526..0000000 --- a/mixpanel-dispatcher/sonar.gradle +++ /dev/null @@ -1,39 +0,0 @@ -apply plugin: 'org.sonarqube' - -sonarqube { - properties { - - def libraries = project.android.sdkDirectory.getPath() + "/platforms/android-" + project.android.defaultConfig.targetSdkVersion.mApiLevel + "/android.jar" - //if (project.plugins.hasPlugin('com.android.application')) { - // "$buildDir/intermediates/exploded-aar/**/classes.jar" - // } - - property "sonar.projectName", "Android Mixpanel Dispatcher" - property "sonar.projectDescription", "Batch.com's Android Mixpanel Dispatcher main artifact" - property "sonar.projectKey", "BatchLabs_Batch-Android-mixpanel-dispatcher" - property "sonar.projectVersion", project.android.defaultConfig.versionName - property "sonar.organization", "batch" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.login", System.getenv('SONAR_TOKEN') - - property "sonar.sources", "src/main/java" - property "sonar.tests", "src/test/java" - property "sonar.binaries", "$buildDir/intermediates/javac/debug/classes" - - property "sonar.java.binaries", "$buildDir/intermediates/javac/debug/classes" - property "sonar.java.libraries", libraries - - property "sonar.java.test.binaries", "$buildDir/intermediates/javac/debugUnitTest/classes" - property "sonar.java.test.libraries", libraries - - // Junit report - property "sonar.junit.reportPaths", "$buildDir/test-results/testDebugUnitTest/" - - // Jacoco report - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.coverage.jacoco.xmlReportPaths", "$buildDir/test-results/jacoco.xml" - - // Lint report - property "sonar.androidLint.reportPaths", "$buildDir/reports/lint-results-debug.xml" - } -} \ No newline at end of file diff --git a/mixpanel-dispatcher/src/main/AndroidManifest.xml b/mixpanel-dispatcher/src/main/AndroidManifest.xml index b7eeaa2..78e5580 100644 --- a/mixpanel-dispatcher/src/main/AndroidManifest.xml +++ b/mixpanel-dispatcher/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - +