Skip to content

Commit c80326e

Browse files
committed
Project structure
1 parent 7f8240a commit c80326e

File tree

11 files changed

+739
-0
lines changed

11 files changed

+739
-0
lines changed

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Compiled class file
2+
*.class
3+
4+
# Log file
5+
*.log
6+
7+
# BlueJ files
8+
*.ctxt
9+
10+
# Mobile Tools for Java (J2ME)
11+
.mtj.tmp/
12+
13+
# Package Files #
14+
*.jar
15+
*.war
16+
*.nar
17+
*.ear
18+
*.zip
19+
*.tar.gz
20+
*.rar
21+
22+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23+
hs_err_pid*
24+
replay_pid*
25+
26+
.gradle
27+
/local.properties
28+
local.properties
29+
30+
# IntelliJ files
31+
*.iml
32+
.idea/
33+
build/
34+
*/build/
35+
captures/
36+
.externalNativeBuild
37+
.cxx
38+
39+
40+
.DS_Store

build.gradle

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
allprojects {
3+
}
4+
5+
6+
tasks.register('clean', Delete) {
7+
delete rootProject.layout.buildDirectory
8+
}
9+
//
10+
//tasks.withType(Test).configureEach {
11+
// useJUnitPlatform()
12+
//}

examples/app/build.gradle

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
plugins {
2+
id 'com.android.application'
3+
id 'de.mannodermaus.android-junit5'
4+
}
5+
6+
android {
7+
namespace = 'com.github.neboskreb.log4j2.examples.app'
8+
compileSdk = 35
9+
10+
defaultConfig {
11+
applicationId "com.github.neboskreb.log4j2.examples.app"
12+
minSdk = 27
13+
targetSdk = 35
14+
versionCode 1
15+
versionName "1.0"
16+
17+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
18+
}
19+
20+
buildTypes {
21+
release {
22+
minifyEnabled false
23+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24+
signingConfig = signingConfigs.debug
25+
}
26+
}
27+
28+
compileOptions {
29+
sourceCompatibility JavaVersion.VERSION_17
30+
targetCompatibility JavaVersion.VERSION_17
31+
}
32+
33+
dataBinding {
34+
enable = true
35+
}
36+
37+
packagingOptions {
38+
exclude 'META-INF/DEPENDENCIES'
39+
exclude 'META-INF/LICENSE*'
40+
}
41+
}
42+
43+
dependencies {
44+
implementation(project(":examples:lib"))
45+
implementation(project(":library"))
46+
47+
implementation 'androidx.appcompat:appcompat:1.7.0'
48+
// implementation 'com.android.support:design:28.0.0'
49+
implementation 'com.google.android.material:material:1.12.0'
50+
51+
// ==== Lombok
52+
//noinspection AnnotationProcessorOnCompilePath -- because Lombok annotations are contained in this package, so you get import errors without it
53+
compileOnly 'org.projectlombok:lombok:1.18.38'
54+
annotationProcessor 'org.projectlombok:lombok:1.18.38'
55+
// ==== /Lombok
56+
57+
58+
testImplementation platform('org.junit:junit-bom:5.12.2')
59+
testImplementation "org.junit.jupiter:junit-jupiter-api"
60+
testImplementation 'org.junit.jupiter:junit-jupiter'
61+
testImplementation 'org.junit.platform:junit-platform-launcher'
62+
63+
64+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
65+
androidTestImplementation platform('org.junit:junit-bom:5.12.2')
66+
androidTestImplementation "org.junit.jupiter:junit-jupiter-api"
67+
androidTestImplementation 'org.junit.jupiter:junit-jupiter'
68+
androidTestImplementation 'org.junit.platform:junit-platform-launcher'
69+
}

examples/lib/build.gradle

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
plugins {
2+
id 'com.android.library'
3+
id 'de.mannodermaus.android-junit5'
4+
}
5+
6+
android {
7+
namespace = 'com.github.neboskreb.log4j2.examples.lib'
8+
compileSdk = 35
9+
10+
defaultConfig {
11+
minSdk = 26
12+
13+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14+
consumerProguardFiles "consumer-rules.pro"
15+
}
16+
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
24+
packagingOptions {
25+
exclude 'META-INF/DEPENDENCIES'
26+
}
27+
28+
compileOptions {
29+
sourceCompatibility JavaVersion.VERSION_17
30+
targetCompatibility JavaVersion.VERSION_17
31+
}
32+
}
33+
34+
dependencies {
35+
implementation 'org.slf4j:slf4j-api:2.0.17'
36+
implementation 'org.slf4j:slf4j-ext:2.0.17'
37+
38+
// ==== Lombok
39+
//noinspection AnnotationProcessorOnCompilePath -- because Lombok annotations are contained in this package, so you get import errors without it
40+
compileOnly 'org.projectlombok:lombok:1.18.38'
41+
annotationProcessor 'org.projectlombok:lombok:1.18.38'
42+
// ==== /Lombok
43+
44+
45+
testImplementation(project(":library"))
46+
testImplementation platform('org.junit:junit-bom:5.12.2')
47+
testImplementation 'org.junit.jupiter:junit-jupiter-api'
48+
testImplementation 'org.junit.jupiter:junit-jupiter'
49+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
50+
51+
52+
androidTestImplementation(project(":library"))
53+
androidTestImplementation 'androidx.test:core:1.6.1'
54+
androidTestImplementation 'androidx.test:runner:1.6.2'
55+
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
56+
androidTestImplementation platform('org.junit:junit-bom:5.12.2')
57+
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api'
58+
androidTestImplementation 'org.junit.jupiter:junit-jupiter'
59+
androidTestImplementation 'org.junit.platform:junit-platform-launcher'
60+
}

gradle.properties

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Project-wide Gradle settings.
2+
# IDE (e.g. Android Studio) users:
3+
# Gradle settings configured through the IDE *will override*
4+
# any settings specified in this file.
5+
# For more details on how to configure your build environment visit
6+
# http://www.gradle.org/docs/current/userguide/build_environment.html
7+
# Specifies the JVM arguments used for the daemon process.
8+
# The setting is particularly useful for tweaking memory settings.
9+
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10+
# When configured, Gradle will run in incubating parallel mode.
11+
# This option should only be used with decoupled projects. For more details, visit
12+
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
13+
# org.gradle.parallel=true
14+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app's APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
18+
# Kotlin code style for this project: "official" or "obsolete":
19+
kotlin.code.style=official
20+
# Enables namespacing of each library's R class so that its R class includes only the
21+
# resources declared in the library itself and none from the library's dependencies,
22+
# thereby reducing the size of the R class for that library
23+
android.nonTransitiveRClass=true
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)