Skip to content

Add 'Automatic-Module-Name' entry to manifest#340

Merged
swankjesse merged 1 commit intosquare:masterfrom
KyoriPowered:feature/9-amn
Feb 4, 2018
Merged

Add 'Automatic-Module-Name' entry to manifest#340
swankjesse merged 1 commit intosquare:masterfrom
KyoriPowered:feature/9-amn

Conversation

@kashike
Copy link
Contributor

@kashike kashike commented Feb 2, 2018

adds #339

@swankjesse
Copy link
Collaborator

I think we want com.squareup.okio ?

@kashike
Copy link
Contributor Author

kashike commented Feb 2, 2018

@swankjesse square/okhttp#3743 (comment)

I think using ${project.groupId} in the module name setup is unwise. The module name is just as much a part of your source code as the package name is, and should be treated as part of your API for compatibility purposes. Just encode the full name in the pom.xml so it doesn't get changed. In addition, Maven artifact and group IDs are often bad guidance for module names. Focus on the package names, and you'll be fine.

@JakeWharton
Copy link
Collaborator

JakeWharton commented Feb 3, 2018 via email

@kashike
Copy link
Contributor Author

kashike commented Feb 3, 2018

@JakeWharton square/okhttp#3743 (comment)
Package name is okio: https://github.com/square/okio/tree/master/okio/src/main/java/okio.

Your module name should be the same as the package name in that jar file, unless you have a good reason otherwise. ie. you as a human are deciding that one package is the base, and assigning that as the module name. Thus the okhttp3 pom.xml would declare a module name of okhttp3 (I dislike that this is not com.squareup.okhttp3 but you should still match the package name)

@JakeWharton
Copy link
Collaborator

JakeWharton commented Feb 3, 2018 via email

@kashike
Copy link
Contributor Author

kashike commented Feb 3, 2018

Alright, there you go then.

@swankjesse swankjesse merged commit 53975f8 into square:master Feb 4, 2018
15characterlimi pushed a commit to 15characterlimi/okio that referenced this pull request Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants