Skip to content

Commit 4ab3306

Browse files
committed
Gradle build configuration refactoring
Signed-off-by: andreypfau <[email protected]>
1 parent 61a2e1f commit 4ab3306

File tree

131 files changed

+234
-1847
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+234
-1847
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616

1717
env:
1818
GRADLE_USER_HOME: ${{ github.workspace }}/.gradle
19-
JAVA_VERSION: '17'
19+
JAVA_VERSION: '21'
2020

2121
jobs:
2222
publish:

.github/workflows/validation.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
6868
- name: mingwX64 tests
6969
shell: bash
70-
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache compileKotlinMingwX64 linkDebugTestMingwX64
70+
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache compileKotlinMingwX64
7171

7272
macos:
7373
name: macOS (macosArm64 only)
@@ -102,17 +102,6 @@ jobs:
102102
java-version: ${{ env.JAVA_VERSION }}
103103
- uses: gradle/actions/setup-gradle@v4
104104

105-
- name: detekt
106-
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache detekt
107-
108-
- name: ktlintCheck (if present)
109-
run: |
110-
if ./gradlew -q tasks --all | grep -qE '^ktlintCheck\s'; then
111-
./gradlew --stacktrace --build-cache --parallel --configuration-cache ktlintCheck
112-
else
113-
echo "ktlintCheck not found, skipping"
114-
fi
115-
116105
- name: checkLegacyAbi
117106
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache checkLegacyAbi
118107

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.5.1-SNAPSHOT

adnl/build.gradle.kts

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id("multiplatform")
3-
id("publish")
2+
id("ton-kotlin.project.library")
3+
id("kotlinx-serialization")
44
}
55

66
kotlin {
@@ -13,40 +13,8 @@ kotlin {
1313
implementation(libs.datetime)
1414
implementation(libs.coroutines.core)
1515
implementation(libs.ktor.utils)
16-
}
17-
}
18-
nativeMain {
19-
dependencies {
20-
implementation(libs.bignum)
21-
}
22-
}
23-
appleMain {
24-
dependencies {
25-
implementation(libs.ktor.network)
26-
}
27-
}
28-
jvmMain {
29-
dependencies {
30-
implementation(libs.ktor.network)
31-
}
32-
}
33-
linuxMain {
34-
dependencies {
3516
implementation(libs.ktor.network)
3617
}
3718
}
38-
39-
all {
40-
if (name.endsWith("Main")) {
41-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Main")}"
42-
kotlin.srcDir("src$suffix")
43-
resources.srcDir("resources$suffix")
44-
}
45-
if (name.endsWith("Test")) {
46-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Test")}"
47-
kotlin.srcDir("test$suffix")
48-
resources.srcDir("testResources$suffix")
49-
}
50-
}
5119
}
5220
}

adnl/src@linux/network/TcpClientImpl.kt

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

adnl/src@mingw/network/TcpClientImpl.kt

Lines changed: 0 additions & 28 deletions
This file was deleted.
File renamed without changes.

bigint/build.gradle.kts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
2-
id("multiplatform")
3-
id("publish")
2+
id("ton-kotlin.project.library")
43
}
54

65
kotlin {
@@ -10,18 +9,5 @@ kotlin {
109
implementation(libs.bignum)
1110
}
1211
}
13-
14-
all {
15-
if (name.endsWith("Main")) {
16-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Main")}"
17-
kotlin.srcDir("src$suffix")
18-
resources.srcDir("resources$suffix")
19-
}
20-
if (name.endsWith("Test")) {
21-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Test")}"
22-
kotlin.srcDir("test$suffix")
23-
resources.srcDir("testResources$suffix")
24-
}
25-
}
2612
}
2713
}

bitstring/build.gradle.kts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
2-
id("multiplatform")
3-
id("publish")
2+
id("ton-kotlin.project.library")
3+
id("ton-kotlin.target.js")
4+
id("kotlinx-serialization")
45
}
56

67
kotlin {
@@ -11,18 +12,5 @@ kotlin {
1112
implementation(libs.kotlinx.io.bytestring)
1213
}
1314
}
14-
15-
all {
16-
if (name.endsWith("Main")) {
17-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Main")}"
18-
kotlin.srcDir("src$suffix")
19-
resources.srcDir("resources$suffix")
20-
}
21-
if (name.endsWith("Test")) {
22-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Test")}"
23-
kotlin.srcDir("test$suffix")
24-
resources.srcDir("testResources$suffix")
25-
}
26-
}
2715
}
2816
}

block-tlb/build.gradle.kts

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
2-
id("multiplatform")
3-
id("publish")
2+
id("ton-kotlin.project.library")
3+
id("kotlinx-serialization")
44
}
55

66
kotlin {
@@ -13,18 +13,5 @@ kotlin {
1313
implementation(libs.serialization.core)
1414
}
1515
}
16-
17-
all {
18-
if (name.endsWith("Main")) {
19-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Main")}"
20-
kotlin.srcDir("src$suffix")
21-
resources.srcDir("resources$suffix")
22-
}
23-
if (name.endsWith("Test")) {
24-
val suffix = if (name.startsWith("common")) "" else "@${name.removeSuffix("Test")}"
25-
kotlin.srcDir("test$suffix")
26-
resources.srcDir("testResources$suffix")
27-
}
28-
}
2916
}
3017
}

0 commit comments

Comments
 (0)