Configure publishing multiple times

Here is the minimum build.gradle file that replicates the issue. Am I doing something really silly here?

apply plugin: LibraryPlugin

class MyBasePlugin implements Plugin<Project> {

	@Override
	void apply(Project project) {
		project.apply plugin: 'maven-publish'
		
		project.repositories {
			maven {
				url "${project.properties.mavenRepoUrl}/repo"
			}
		}
		
		project.publishing {
			repositories {
				maven {
					url "${project.properties.mavenRepoUrl}/libs-release-local"
					credentials {
							username project.properties.mavenRepoUsername
							password project.properties.mavenRepoPassword
					}
				}
			}
		}
	}
}

class LibraryPlugin implements Plugin<Project> {
	
	final static String LIBRARY_REPOSITORY = 'libs-release-local'
	
	@Override
	public void apply(Project project) {
		project.apply plugin: MyBasePlugin
		project.apply plugin: 'groovy'
		
		project.dependencies {
			compile group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.3.7', classifier: 'indy'
		}
		
		project.publishing {
			publications {
				mavenLibrary(MavenPublication) {
					from project.components.java
				}
			}
		}
	}
	
}

The error I get when I run gradle tasks:

* What went wrong:
A problem occurred evaluating root project 'gradle'.
> Failed to apply plugin [class 'LibraryPlugin']
   > Failed to apply plugin [class 'MyBasePlugin']
      > Cannot configure the 'publishing' extension after it has been accessed.