Skip to content

Commit dd44af7

Browse files
committed
Build with kts
1 parent 95f9c03 commit dd44af7

21 files changed

Lines changed: 382 additions & 359 deletions

File tree

.github/workflows/Android-CI-Espresso.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ jobs:
2020
abi: [ x86_64 ]
2121
tag: [ 'default' ]
2222
java_version: [ 17 ]
23-
# include:
24-
# - java_version: 17
25-
# os: macOS-14
26-
# api: 31
27-
# abi: arm64-v8a
28-
# tag: 'google_apis'
23+
# include:
24+
# - java_version: 17
25+
# os: macOS-14
26+
# api: 31
27+
# abi: arm64-v8a
28+
# tag: 'google_apis'
2929
steps:
3030
- name: Show architecture
3131
run: uname -a
32-
- name: Checkout
33-
uses: actions/checkout@v6
32+
- uses: actions/checkout@v6
33+
with:
34+
fetch-depth: 0
35+
submodules: true
3436
- name: Install JDK ${{ matrix.java_version }}
3537
uses: actions/setup-java@v5
3638
with:
@@ -88,8 +90,10 @@ jobs:
8890
os: [ ubuntu-latest ]
8991
java_version: [ 17 ]
9092
steps:
91-
- name: Checkout
92-
uses: actions/checkout@v6
93+
- uses: actions/checkout@v6
94+
with:
95+
fetch-depth: 0
96+
submodules: true
9397
- name: Install JDK ${{ matrix.java_version }}
9498
uses: actions/setup-java@v5
9599
with:

.github/workflows/Android-CI-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
name: Publish release
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v6
13+
- uses: actions/checkout@v6
1514
with:
1615
fetch-depth: 0
16+
submodules: true
1717
- name: Get the version
1818
id: tagger
1919
uses: jimschubert/query-tag-action@v2

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "buildSrc"]
2+
path = buildSrc
3+
url = git@github.com:hannesa2/KotlinBuildSource.git

.idea/codeStyles/Project.xml

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LogcatCoreLib/build.gradle

Lines changed: 0 additions & 53 deletions
This file was deleted.

LogcatCoreLib/build.gradle.kts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import info.git.versionHelper.getVersionText
2+
3+
plugins {
4+
id("com.android.library")
5+
id("kotlin-android")
6+
id("maven-publish")
7+
}
8+
9+
android {
10+
namespace = "info.hannes.logcat"
11+
defaultConfig {
12+
compileSdk = 36
13+
buildConfigField("String", "VERSION_NAME", "\"${getVersionText()}\"")
14+
15+
minSdk = 23
16+
setProperty("archivesBaseName", "LogcatCore")
17+
}
18+
compileOptions {
19+
sourceCompatibility = JavaVersion.VERSION_17
20+
targetCompatibility = JavaVersion.VERSION_17
21+
}
22+
buildFeatures {
23+
buildConfig = true
24+
}
25+
publishing {
26+
singleVariant("release") {}
27+
}
28+
}
29+
30+
dependencies {
31+
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.20")
32+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
33+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.4")
34+
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.9.4")
35+
api("com.jakewharton.timber:timber:5.0.1")
36+
}
37+
38+
afterEvaluate {
39+
publishing {
40+
publications {
41+
create<MavenPublication>("maven") {
42+
from(components["release"])
43+
pom {
44+
licenses {
45+
license {
46+
name = "Apache License Version 2.0"
47+
url = "https://github.com/AppDevNext/Logcat/blob/master/LICENSE"
48+
}
49+
}
50+
}
51+
}
52+
}
53+
}
54+
}

LogcatCoreUI/build.gradle

Lines changed: 0 additions & 56 deletions
This file was deleted.

LogcatCoreUI/build.gradle.kts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import info.git.versionHelper.getVersionText
2+
3+
plugins {
4+
id("com.android.library")
5+
id("kotlin-android")
6+
id("maven-publish")
7+
}
8+
9+
android {
10+
namespace = "info.hannes.logcat.ui"
11+
defaultConfig {
12+
compileSdk = 36
13+
buildConfigField("String", "VERSION_NAME", "\"${getVersionText()}\"")
14+
15+
minSdk = 23
16+
setProperty("archivesBaseName", "LogcatCoreUI")
17+
}
18+
buildFeatures {
19+
viewBinding = true
20+
buildConfig = true
21+
}
22+
compileOptions {
23+
sourceCompatibility = JavaVersion.VERSION_17
24+
targetCompatibility = JavaVersion.VERSION_17
25+
}
26+
publishing {
27+
singleVariant("release") {}
28+
}
29+
}
30+
31+
dependencies {
32+
api(project(":LogcatCoreLib"))
33+
implementation("androidx.core:core-ktx:1.17.0")
34+
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.2.20")
35+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
36+
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.9.4")
37+
implementation("androidx.recyclerview:recyclerview:1.4.0")
38+
api("com.google.android.material:material:1.13.0")
39+
}
40+
41+
afterEvaluate {
42+
publishing {
43+
publications {
44+
create<MavenPublication>("maven") {
45+
from(components["release"])
46+
pom {
47+
licenses {
48+
license {
49+
name = "Apache License Version 2.0"
50+
url = "https://github.com/AppDevNext/Logcat/blob/master/LICENSE"
51+
}
52+
}
53+
}
54+
}
55+
}
56+
}
57+
}

LogcatCountlyLib/build.gradle

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)