41 用户自定义插件之终结版
apply plugin: 'groovy' // 必须 apply plugin: 'maven-publish' dependencies { implementation gradleApi() // 必须 implementation localGroovy() // 必须 } repositories { google() mavenCentral() // 必须 } // 把项目入口设置成/src/main/groovy sourceSets { main { groovy { srcDir 'src/main/groovy' } } } // 添加publishing配置,实现发布 publishing { // 发布什么 publications { maven(MavenPublication) { groupId = "com.sand.group" artifactId = "mt" version = "1.0.2" description "MTPlug is a good apm tool" from components.java } } // 发布到哪里 repositories { maven { allowInsecureProtocol true url = 'http://161.117.195.45:6677/repository/sand_repo/' credentials { it.username = "username" it.password = "pwd" } } } }
最后更新于