buildscript {
    ext.kotlin_version = '1.7.10'
    ext.gradle_version = '7.4.2'

    repositories {
        maven {
            url 'https://maven.aliyun.com/repository/google'
        }
        maven {
            url 'https://maven.aliyun.com/repository/jcenter'
        }
        maven {
            url 'https://maven.aliyun.com/nexus/content/groups/public'
        }
        google()
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
plugins {
    id 'groovy'
    id 'org.jetbrains.kotlin.jvm'
    id 'java-gradle-plugin'
    id 'maven-publish'
    id 'kotlin'
}

gradlePlugin {
    plugins {
        modularPlugin {
            // Plugin id.
            id = 'resCompress'
            // Plugin implementation.
            implementationClass = 'com.fuusy.plugin.rescompress.ResCompressPlugin'
        }
    }
}

publishing {
    publications {
        mavenJava(MavenPublication){
            groupId 'com.fuusy'
            artifactId 'plugin'
            version = '1.0.1'

            from components.java
        }
    }
}

publishing {
    repositories {
        mavenLocal()
        maven {
            url = uri('./../repo')
        }
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "com.android.tools.build:gradle:$gradle_version"
    implementation "com.android.tools:common:30.2.1"
    implementation gradleApi()
    implementation "pink.madis.apk.arsc:android-chunk-utils:0.0.7"

    implementation("org.ow2.asm:asm:9.3")
    implementation("org.ow2.asm:asm-commons:9.3")
    implementation("org.ow2.asm:asm-util:9.3")
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
    implementation "com.android.tools:common:30.2.1"
}

