Skip to content

Commit e05dcf4

Browse files
committed
wip
1 parent 02352ce commit e05dcf4

File tree

5 files changed

+58
-0
lines changed

5 files changed

+58
-0
lines changed

buildSrc/build.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
plugins {
2+
//id 'groovy-gradle-plugin'
3+
id 'java'
4+
}
5+
6+
repositories {
7+
gradlePluginPortal()
8+
}
9+
10+
def log4jVersion = providers.environmentVariable("LOG4J_VERSION").getOrElse("2.25.0")
11+
12+
tasks.withType(JavaCompile).configureEach {
13+
// Test compatibility of `compileOnly` dependencies with Java 8
14+
//
15+
// See: https://github.com/gradle/gradle/issues/33964
16+
options.release = 8
17+
options.compilerArgs.add("-Werror") // treat all warnings as errors
18+
options.compilerArgs.add("-Xlint:all") // includes 'classfile' check
19+
}
20+
21+
dependencies {
22+
implementation gradleApi()
23+
24+
implementation "org.apache.logging.log4j:log4j-core:${log4jVersion}"
25+
implementation "org.apache.logging.log4j:log4j-api:${log4jVersion}"
26+
implementation "org.apache.logging.log4j:log4j-slf4j2-impl:${log4jVersion}"
27+
}
28+
29+
test {
30+
useJUnitPlatform()
31+
}

buildSrc/gradle.properties

Whitespace-only changes.

buildSrc/settings.gradle

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to you under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.example;
18+
19+
import org.gradle.api.DefaultTask;
20+
import org.gradle.api.tasks.TaskAction;
21+
22+
public class MyCustomTask extends DefaultTask {
23+
@TaskAction
24+
public void run() {
25+
System.out.println("Custom task executed!");
26+
}
27+
}

log4j-samples-gradle-metadata/settings.gradle

Whitespace-only changes.

0 commit comments

Comments
 (0)