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