Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

# ktlint rule configuration (moved here from the ktlint{} Gradle block,
# which no longer supports disabledRules since ktlint-gradle 12+)
[*.{kt,kts}]
# keep the pre-ktlint-1.x rule behaviour instead of the stricter ktlint_official style
ktlint_code_style = intellij_idea
# disabled because java imports put to the list end by intellij
ktlint_standard_import-ordering = disabled
ktlint_standard_chain-wrapping = disabled
# rules introduced after ktlint 0.46 that the existing code does not follow
ktlint_standard_class-signature = disabled
ktlint_standard_function-expression-body = disabled
25 changes: 5 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: "org.jlleitschuh.gradle.ktlint"
buildscript {
ext.kotlin_version = '1.9.21'
ext.kotlin_version = '2.3.21'
ext.groupName = 'com.github.SchwarzIT'
repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
url = "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:8.13.2'
classpath 'com.android.tools.build:gradle:9.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.5.1"
classpath "org.jlleitschuh.gradle:ktlint-gradle:14.2.0"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.21-1.0.15"
classpath "com.google.devtools.ksp:symbol-processing-gradle-plugin:2.3.9"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -38,20 +37,6 @@ allprojects {

repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.google.com' }
google()
}

ktlint {
// disabled because java imports put to the list end by intellij
disabledRules = [
"import-ordering",
"chain-wrapping",
]

// Workaround for ktlint memory leak; remove when issue got fixed
// https://github.com/JLLeitschuh/ktlint-gradle/issues/507
version = "0.46.1"
}
}
49 changes: 20 additions & 29 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,52 +1,44 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "com.google.devtools.ksp"
apply plugin: 'kotlin-allopen'

android {
lint {
checkReleaseBuilds false
abortOnError false
checkReleaseBuilds = false
abortOnError = false
}

namespace 'kaufland.com.demo'
namespace = 'kaufland.com.demo'
compileSdk = 36
defaultConfig {
applicationId "kaufland.com.demo"
minSdkVersion 21
compileSdk = 33
targetSdkVersion 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

applicationId = "kaufland.com.demo"
minSdk = 21
targetSdk = 36
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

buildFeatures {
viewBinding true
viewBinding = true
}

// workaround for "duplicate files during packaging of APK" issue:
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}

kotlin {
sourceSets.all {
kotlin.srcDir("build/generated/ksp/$name/kotlin")
packaging {
resources {
excludes += ['META-INF/ASL2.0', 'META-INF/LICENSE', 'META-INF/NOTICE']
}
}
}

Expand All @@ -63,6 +55,5 @@ dependencies {
implementation project(path: ':demolibrary')
implementation project(path: ':kokain-di')
implementation project(path: ':kokain-core-api')
ksp ksp(project(':kokain-ksp',))
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
ksp project(':kokain-ksp')
}
32 changes: 10 additions & 22 deletions demolibrary/build.gradle
Original file line number Diff line number Diff line change
@@ -1,54 +1,42 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
//apply plugin: 'kotlin-kapt'
apply plugin: "org.jlleitschuh.gradle.ktlint"
apply plugin: "com.google.devtools.ksp"

android {

lint {
checkReleaseBuilds false
abortOnError false
checkReleaseBuilds = false
abortOnError = false
}

namespace 'com.example.demolibrary'
namespace = 'com.example.demolibrary'
compileSdk = 36
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
compileSdk = 33
versionCode 1
versionName "1.0"
minSdk = 21

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}

buildTypes {
release {
minifyEnabled false
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

}

kotlin {
sourceSets.all {
kotlin.srcDir("build/generated/ksp/$name/kotlin")
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.core:core-ktx:1.8.0'
implementation project(path: ':kokain-di')
implementation project(path: ':kokain-core-api')
ksp ksp(project(':kokain-ksp',))
ksp project(':kokain-ksp')
testImplementation 'junit:junit:4.12'
}
2 changes: 0 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
android.useAndroidX=true
android.enableJetifier=true
ksp.incremental.log=true
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=--illegal-access=permit
2 changes: 2 additions & 0 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#This file is generated by updateDaemonJvm
toolchainVersion=17
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
13 changes: 5 additions & 8 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 12 additions & 24 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions kokain-core-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: "org.jlleitschuh.gradle.ktlint"

kotlin {
jvmToolchain(17)
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}

publishing {
Expand All @@ -19,10 +22,9 @@ publishing {
}
}

targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_17

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withSourcesJar()
withJavadocJar()
}
Loading
Loading