apply plugin: 'maven-publish'

version '0.8.8'

task sourceJar(type: Jar) {
    from android.sourceSets.main.java.srcDirs
    classifier "source"
}

afterEvaluate {
    publishing {
        publications {
            release(MavenPublication) {
                from components.release

                artifact(sourceJar)

                groupId 'com.github.appspell'
                artifactId 'ShaderView'
                version this.version

                pom {
                    name = "ShaderView"
                    description = "This library is the easiest way to use OpenGL shaders as an Android View. You just simply need to add ShaderView in your layout and set up shaders."
                    url.set("https://github.com/appspell/ShaderView")

                    licenses {
                        license {
                            name.set("MIT")
                            url.set("https://github.com/appspell/ShaderView/blob/main/LICENSE")
                        }
                    }

                    scm {
                        connection.set("scm:git:https://github.com/appspell/ShaderView.git")
                        developerConnection.set("scm:git:https://github.com/appspell/ShaderView.git")
                        url.set("https://github.com/appspell/ShaderView")
                    }
                }
            }
        }
    }
}