General cleanup of gradle related things.
This commit is contained in:
parent
d99e28178d
commit
1b851d2def
@ -5,22 +5,35 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name 'jbarchiva'
|
||||
url 'https://archiva.jessebrault.com/repository/internal/'
|
||||
credentials {
|
||||
username System.getenv('JBARCHIVA_USERNAME')
|
||||
password System.getenv('JBARCHIVA_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api libs.jbarchiva
|
||||
testImplementation libs.junit.jupiter.api
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
create('GroowtAntlrPlugin') {
|
||||
id = 'GroowtAntlrPlugin'
|
||||
id = 'groowt-antlr-plugin'
|
||||
implementationClass = 'groowt.gradle.antlr.GroowtAntlrPlugin'
|
||||
}
|
||||
create('groowtLogging') {
|
||||
id = 'groowt-logging'
|
||||
implementationClass = 'groowt.gradle.logging.GroowtLoggingPlugin'
|
||||
}
|
||||
create('groowtPublish') {
|
||||
id = 'groowt-publish'
|
||||
implementationClass = 'groowt.gradle.publish.GroowtPublishPlugin'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,9 @@ plugins {
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = 'groowt'
|
||||
version = '0.1.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package groowt.gradle.publish
|
||||
|
||||
import com.jessebrault.jbarchiva.JbArchivaPlugin
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||
|
||||
class GroowtPublishPlugin implements Plugin<Project> {
|
||||
|
||||
@Override
|
||||
void apply(Project project) {
|
||||
project.plugins.apply(MavenPublishPlugin)
|
||||
project.plugins.apply(JbArchivaPlugin)
|
||||
}
|
||||
|
||||
}
|
@ -1,13 +1,9 @@
|
||||
plugins {
|
||||
id 'GroowtConventions'
|
||||
id 'groowt-conventions'
|
||||
id 'groowt-logging'
|
||||
id 'com.jessebrault.jbarchiva' version '0.1.0'
|
||||
id 'maven-publish'
|
||||
id 'groowt-publish'
|
||||
}
|
||||
|
||||
group = 'groowt'
|
||||
version = '0.1.0'
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://repo.gradle.org/gradle/libs-releases'
|
||||
@ -15,15 +11,9 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
[
|
||||
libs.gradle.tooling,
|
||||
libs.picocli,
|
||||
libs.slf4j.api,
|
||||
libs.log4j.core,
|
||||
project(':groowt-gradle-model')
|
||||
].each { implementation it }
|
||||
|
||||
runtimeOnly libs.log4j.slf4jBinding
|
||||
implementation libs.gradle.tooling
|
||||
implementation libs.picocli
|
||||
implementation project(':groowt-gradle-model')
|
||||
}
|
||||
|
||||
tasks.named('jar', Jar) {
|
||||
@ -35,7 +25,7 @@ tasks.named('jar', Jar) {
|
||||
dependsOn ':groowt-gradle-model:jar'
|
||||
}
|
||||
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
tasks.withType(GenerateModuleMetadata).configureEach {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ import java.io.OutputStream;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
@Command(name = "generate", aliases = "gen", description = "Generate a component, template, model, etc.")
|
||||
public class Generate implements Callable<Integer> {
|
||||
public final class Generate implements Callable<Integer> {
|
||||
|
||||
@CommandLine.ParentCommand
|
||||
private GroowtCli cli;
|
||||
|
@ -13,7 +13,7 @@ import java.io.File;
|
||||
version = "0.1.0",
|
||||
subcommands = { Generate.class }
|
||||
)
|
||||
public class GroowtCli {
|
||||
public final class GroowtCli {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GroowtCli.class);
|
||||
|
||||
|
@ -21,6 +21,7 @@ groovy-console = { module = 'org.apache.groovy:groovy-console', version.ref = 'g
|
||||
groovy-templates = { module = 'org.apache.groovy:groovy-templates', version.ref = 'groovy' }
|
||||
jakarta-inject = 'jakarta.inject:jakarta.inject-api:2.0.1'
|
||||
jansi = 'org.fusesource.jansi:jansi:2.4.1'
|
||||
jbarchiva = 'com.jessebrault.jbarchiva:jbarchiva:0.2.1'
|
||||
jetbrains-anotations = 'org.jetbrains:annotations:24.1.0'
|
||||
junit-jupiter-api = { module = 'org.junit.jupiter:junit-jupiter-api', version.ref = 'junit' }
|
||||
kotlin-stdlib = { module = 'org.jetbrains.kotlin:kotlin-stdlib', version.ref = 'kotlin' }
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -1,16 +1,7 @@
|
||||
plugins {
|
||||
id 'GroowtConventions'
|
||||
id 'groowt-conventions'
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
group = 'groowt'
|
||||
version = '0.1.0'
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://repo.gradle.org/gradle/libs-releases'
|
||||
}
|
||||
id 'groowt-publish'
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
@ -29,6 +29,4 @@ public class DefaultGroowtGradleModel implements GroowtGradleModel, Serializable
|
||||
this.sourceSetToTemplatesDirs = sourceSetToTemplateDir;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,9 +5,6 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public interface GroowtGradleModel {
|
||||
|
||||
String getBasePackage();
|
||||
|
||||
Map<String, Set<File>> getSourceSetToTemplatesDirs();
|
||||
|
||||
}
|
||||
|
@ -1,27 +1,21 @@
|
||||
plugins {
|
||||
id 'GroowtConventions'
|
||||
id 'groowt-conventions'
|
||||
id 'java-gradle-plugin'
|
||||
id 'com.jessebrault.jbarchiva' version '0.1.0'
|
||||
id 'maven-publish'
|
||||
id 'groowt-publish'
|
||||
}
|
||||
|
||||
group = 'groowt'
|
||||
version = '0.1.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
// maven {
|
||||
// url 'https://repo.gradle.org/gradle/libs-releases'
|
||||
// }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.groovy, project(':groowt-gradle-model')
|
||||
implementation libs.groovy
|
||||
implementation project(':groowt-gradle-model')
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
groowtGradle {
|
||||
create('groowtGradle') {
|
||||
id = 'groowt-gradle'
|
||||
implementationClass = 'groowt.gradle.GroowtGradlePlugin'
|
||||
}
|
||||
|
@ -22,7 +22,10 @@ public class DefaultTemplateSourceSet implements TemplateSourceSet, HasPublicTyp
|
||||
objectFactory.sourceDirectorySet(name, displayName + " ComponentTemplate sources")
|
||||
);
|
||||
this.templateSourceDirectorySet.getFilter().include("**/*.wvc", "**/*.gst");
|
||||
this.allTemplates = objectFactory.sourceDirectorySet("all" + name, displayName + " ComponentTemplate sources");
|
||||
this.allTemplates = objectFactory.sourceDirectorySet(
|
||||
"all" + name,
|
||||
displayName + " ComponentTemplate sources"
|
||||
);
|
||||
this.allTemplates.source(this.templateSourceDirectorySet);
|
||||
this.allTemplates.getFilter().include("**/*.wvc", "**/*.gst");
|
||||
}
|
||||
|
@ -2,26 +2,6 @@ pluginManagement {
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.9.23'
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'https://archiva.jessebrault.com/repository/internal/'
|
||||
|
||||
credentials {
|
||||
username System.getenv('JBARCHIVA_USERNAME')
|
||||
password System.getenv('JBARCHIVA_PASSWORD')
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url 'https://archiva.jessebrault.com/repository/snapshots/'
|
||||
|
||||
credentials {
|
||||
username System.getenv('JBARCHIVA_USERNAME')
|
||||
password System.getenv('JBARCHIVA_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = 'groowt'
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'GroowtConventions'
|
||||
id 'groowt-conventions'
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'GroowtConventions'
|
||||
id 'groowt-conventions'
|
||||
id 'java-library'
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,10 @@ import groovy.transform.NullCheck
|
||||
import groowt.gradle.antlr.GroowtAntlrExecTask
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'groowt-conventions'
|
||||
id 'groowt-antlr-plugin'
|
||||
id 'java-library'
|
||||
id 'groovy'
|
||||
id 'GroowtAntlrPlugin'
|
||||
id 'org.jetbrains.kotlin.jvm'
|
||||
id 'java-test-fixtures'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user