Countly / countly-sdk-android

Countly Product Analytics Android SDK
https://count.ly/mobile-analytics
MIT License
677 stars 296 forks source link

how can i apply ly.count.android.plugins.UploadSymbolsPlugin in build.gradle.kts file? #177

Closed VahidGarousi closed 10 months ago

VahidGarousi commented 11 months ago

Expected Behavior

when i migrate my build.gradle to build.gradle.kts i can' apply UploadSymbolsPlugin anymore and also i can't config countly block inside that file

Current Behavior

when i build poroject, i got this error:

Build file '..........\modules\countly\build.gradle.kts' line: 4

Plugin [id: 'ly.count.android.plugins.UploadSymbolsPlugin'] was not found in any of the following sources:

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'ly.count.android.plugins.UploadSymbolsPlugin'] was not found in any of the following sources:

Your Environment

turtledreams commented 11 months ago

Hi @VahidGarousi , would it be possible for you to share your Gradle version and the build.gradle.kts file with us?

VahidGarousi commented 11 months ago

yes distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip androidGradlePlugin = "7.4.1"

import java.io.FileInputStream
import java.util.Properties

plugins {
    id("com.android.library")
    id("kotlin-android")
    id("kotlin-kapt")
    id("kotlin-parcelize")
    id("kotlinx-serialization")
    id("maven-publish")
    // TODO: Please check it had some issues with Kotlin DSL.
//    id("ly.count.android.plugins.UploadSymbolsPlugin")
}
android {
    namespace = "framework.countly"

    compileSdk = ProjectConfig.compileSdk

    defaultConfig {
        minSdk = ProjectConfig.minSdk
        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    testOptions {
        packagingOptions {
            jniLibs {
                useLegacyPackaging = true
            }
        }
    }
    publishing {
        singleVariant("release") {
            withSourcesJar()
            withJavadocJar()
        }
    }
}

dependencies {
    implementation(libs.countly)
    implementation(projects.core)
    implementation(libs.androidx.core.ktx)
    implementation(libs.material)

    implementation(libs.hilt.android)
    kapt(libs.hilt.compiler)

    testImplementation(libs.junit4)
    testImplementation(libs.mockito.core)
    androidTestImplementation(libs.mockito.core)
    androidTestImplementation("io.mockk:mockk-android:1.12.3")// Warning : Don't upgrade this version to 1.12.4 or 1.12.5

    testImplementation(libs.mockk.android)
    testImplementation(libs.mockk.core)
    testImplementation(libs.kotlinx.coroutines.test)
    testImplementation(libs.androidx.test.ext.ktx)
    testImplementation(libs.truth.core)
    testImplementation(libs.mockito.core)
    testImplementation(libs.junit4)

    androidTestImplementation(libs.junit4)
    androidTestImplementation(libs.androidx.test.ext.ktx)
    androidTestImplementation(libs.kotlinx.coroutines.test)
    androidTestImplementation(libs.turbine)
    androidTestImplementation(libs.okhttp.mockwebserver)
    androidTestImplementation(libs.hilt.android.testing)
    androidTestImplementation(libs.mockito.core)
    androidTestImplementation(libs.androidx.test.runner)
    androidTestImplementation(libs.androidx.test.espresso.core)
    androidTestImplementation(libs.robolectric.core)
}
VahidGarousi commented 11 months ago

No answer?

turtledreams commented 11 months ago

Hi @VahidGarousi, sorry for the late response, did not get a notification. The line: id("ly.count.android.plugins.UploadSymbolsPlugin") Could you change it with this: id 'ly.count.android.plugins.upload-symbols' version '23.6.0' and sync again. Let me know how it goes.

VahidGarousi commented 11 months ago

@turtledreams Don't mention it, i will check it and notify you

VahidGarousi commented 10 months ago

@turtledreams Hi , in the preliminary tests, it seems that it is correct and works. If there is a problem, I will send a message about the same problem again.