How do you set the maven artifact ID of a gradle project?

后端 未结 7 723
甜味超标
甜味超标 2021-01-30 03:48

From the gradle maven-publish plugin\'s documentation, it\'s clear that you set the groupId and version of the project directly in build.gradle

7条回答
  •  悲&欢浪女
    2021-01-30 04:14

    For building android and publishing to artifactory using jenkins, I configured the settings below in the app modules's build.gradle for configuring group id, artifact id, and version.

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 21
        buildToolsVersion "21.1.2"
    
        group "com.company.division.productgroup" //add group id
        version "8.8.8" //add version
    
        defaultConfig {
    
            minSdkVersion 9
            targetSdkVersion 21
            versionCode 32
            versionName "$version"
            archivesBaseName = "android-appname" //add artifact id
    
        }
    

提交回复
热议问题