Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Can't set artifact name #48

Open
bpappin opened this issue Aug 31, 2016 · 4 comments
Open

Can't set artifact name #48

bpappin opened this issue Aug 31, 2016 · 4 comments

Comments

@bpappin
Copy link

bpappin commented Aug 31, 2016

the documentation says to use rootProject.name = 'artifact' to set the artifact name, but it's not working properly. It seems to be ignored by the plugin.

@bpappin
Copy link
Author

bpappin commented Sep 1, 2016

FYI its using the project name instead.

@dcendents
Copy link
Owner

This needs to be set in settings.gradle and not in build.gradle.
Are you doing that?

I have an integration test that does that and it is working.

@bpappin
Copy link
Author

bpappin commented Sep 14, 2016

The settings.gradle applies to the entire project, so if I have multiple libraries, they will all have the same artifact name.

Should I put in a new bug for that problem?

@dcendents
Copy link
Owner

Yes settings.gradle applies to the whole project, but you need to set the name of each project individually int it.

include 'app'
include 'library'
include 'baseLibrary'
include 'util'

rootProject.name = 'newName'
project(':library').name = 'newLibName'

But then you need to use the new name in build.gradle.
e.g.: app will link to compile project(':newLibName')

another option to simply generate a different artifact name but not change the gradle project name is to set the property project.archivesBaseName = 'newLibName' in build.gradle.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants