Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from buildScript to dsl #71

Open
melkopisi opened this issue Aug 17, 2023 · 0 comments
Open

Move from buildScript to dsl #71

melkopisi opened this issue Aug 17, 2023 · 0 comments

Comments

@melkopisi
Copy link

First I would like to thank you so much for this fantastic plugin and I apologize for my bad English, I want to know how to use your plugin with the new Android studio gradle plugins dsl block

as per the readme, this is how to add the plugin

// Project's build.gradle
buildscript {
    repositories {
        maven { url 'https://www.testfairy.com/maven' }
    }
    dependencies {
        classpath 'com.testfairy.plugins.gradle:testfairy:3.+'
    }
}

but this form is removed from the project's build.gradle file and now there's gradle plugin management in settings.gradle and I added the repository as following

pluginManagement {
  repositories {
    gradlePluginPortal()
    google()
    mavenCentral()
  }
}
dependencyResolutionManagement {
  repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
    maven { url 'https://maven.testfairy.com' }
  }
}

and to add the classpath line it's now something like this in project's build.gradle so how I convert this classpath to a plugin id

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.4.2' apply false
    id 'com.android.library' version '7.4.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
   // should add classpath 'com.testfairy.plugins.gradle:testfairy:3.+'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant