Skip to content

Commit

Permalink
Fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-gh committed May 30, 2016
1 parent f8055c2 commit 43aff4a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,19 @@ import java.util.function.Supplier
class GenerateMeta extends DefaultTask {

Supplier<List<PluginMetadata>> provider = {[]}
Path target = temporaryDir.toPath().resolve(McModInfo.STANDARD_FILENAME)
Path target

List<PluginMetadata> getMetadata() {
return this.provider.get()
}

Path getTarget() {
return this.target ?: temporaryDir.toPath().resolve(McModInfo.STANDARD_FILENAME)
}

@TaskAction
void generateMetadata() {
McModInfo.DEFAULT.write(target, metadata)
McModInfo.DEFAULT.write(getTarget(), metadata)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
package org.spongepowered.gradle.meta

import static org.spongepowered.gradle.meta.MetadataBaseExtension.getEXTENSION_NAME
import static org.spongepowered.gradle.meta.MetadataBaseExtension.EXTENSION_NAME

import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
package org.spongepowered.gradle.meta

import static org.spongepowered.gradle.meta.MetadataBaseExtension.getEXTENSION_NAME
import static org.spongepowered.gradle.meta.MetadataBaseExtension.EXTENSION_NAME

import org.gradle.api.Plugin
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import static org.gradle.api.JavaVersion.VERSION_1_8
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginConvention
import org.spongepowered.gradle.meta.MetadataBasePlugin
import org.spongepowered.gradle.meta.MetadataPlugin

class SpongePluginPlugin implements Plugin<Project> {

Expand All @@ -56,7 +56,7 @@ class SpongePluginPlugin implements Plugin<Project> {
// IntelliJ IDEA resource fix
idea.module.inheritOutputDirs = true

plugins.apply(MetadataBasePlugin)
plugins.apply(MetadataPlugin)
plugins.apply(SpongePluginBasePlugin)
}
}
Expand Down

0 comments on commit 43aff4a

Please sign in to comment.