Skip to content
This repository was archived by the owner on Aug 19, 2020. It is now read-only.

How to use closures? #1408

@antonalechnovic

Description

@antonalechnovic

I am trying to convert the following groovy snippet to Kotlin:

class CustomPlugin implements Plugin<Project> {
    void apply(Project target) {
        target.apply plugin: 'com.jfrog.artifactory'
        target.artifactory {
            contextUrl = "http://some/artifactory/"
        }

}

How to set target.artifactory.contextUrl and remaining parameters?

I want to configure simillarly to build.gradle :

artifactory {
   contextUrl ="someUrl"
    publish {
        repository {
            repoKey = "some"
            username = "someUsername"
            password = "somePassword"
        }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions