apply plugin: 'groovy'
apply plugin: 'maven-publish'

group = 'com.effective.plugins'
archivesBaseName = 'component'
version = '1.0.11'

// Because the components are created only during the afterEvaluate phase, you must
// configure your publications using the afterEvaluate() lifecycle method.
afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                from components.java

                groupId = group
                artifactId = archivesBaseName
                version = version
            }
        }
//        repositories {
//            maven {
//                url = "../repo"
//            }
//        }
    }
}


dependencies {
    implementation gradleApi()
    implementation localGroovy()
    implementation 'com.android.tools.build:gradle:4.1.0'
    implementation 'org.jetbrains.kotlin:kotlin-compiler-embeddable:1.6.21'
    implementation 'org.ow2.asm:asm:7.1'
    implementation 'org.ow2.asm:asm-commons:7.1'
    implementation 'org.ow2.asm:asm-util:7.1'
    implementation 'cn.quinnchen.hunter:hunter-transform:1.0.0'
}

sourceSets {
    main {
        groovy {
            srcDirs = ['src/main/groovy']
        }
    }
}


repositories {
    mavenCentral()
    google()
    maven { url 'https://jitpack.io' }
    jcenter()
}


//publish {
//    userOrg = 'yummylau'
//    groupId = 'com.effective.plugins'
//    artifactId = 'component'
//    publishVersion = '1.0.8'
//    desc = 'Android component plugin'
//    website = 'https://github.com/YummyLau/ComponentPlugin'
//}


