Skip to content

Commit baa1278

Browse files
committed
Sepalate build environment
1 parent 3b75da4 commit baa1278

File tree

2 files changed

+27
-38
lines changed

2 files changed

+27
-38
lines changed

app/build.gradle.kts

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ android {
1414
namespace = "com.puutaro.commandclick"
1515
compileSdk = 33
1616

17+
buildFeatures {
18+
buildConfig = true
19+
}
20+
1721
defaultConfig {
1822
applicationId = "com.puutaro.commandclick"
1923
minSdk = 27
@@ -23,23 +27,28 @@ android {
2327

2428
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2529
base.archivesName.set("${applicationName}-${versionName}")
26-
30+
buildTypes {
31+
debug {
32+
buildConfigField("boolean", "DEBUG", "true")
33+
}
34+
release {
35+
buildConfigField("boolean", "DEBUG", "false")
36+
isMinifyEnabled = false
37+
proguardFiles(getDefaultProguardFile(
38+
"proguard-android-optimize.txt"),
39+
"proguard-rules.pro"
40+
)
41+
}
42+
}
2743
// ndk {
2844
// abiFilters += listOf("arm64-v8a", "x86_64")
2945
// listOf("armeabi-v7a", "arm64-v8a")
3046
// }
3147
}
3248

3349

34-
buildTypes {
35-
release {
36-
isMinifyEnabled = false
37-
proguardFiles(getDefaultProguardFile(
38-
"proguard-android-optimize.txt"),
39-
"proguard-rules.pro"
40-
)
41-
}
42-
}
50+
51+
4352
compileOptions {
4453
sourceCompatibility = JavaVersion.VERSION_1_8
4554
targetCompatibility = JavaVersion.VERSION_1_8
@@ -60,40 +69,14 @@ extra["architectures"] = listOf("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
6069
//ext.architectures = ["armeabi-v7a", "arm64-v8a", "x86", "x86_64"]
6170
//ext.libDir = "$project.projectDir/src/main/resources/lib"
6271
extra["libDir"] = "${project.projectDir}/src/main/jniLibs"
63-
//chaquopy {
64-
// defaultConfig {
65-
// buildPython("/home/xbabu/.pyenv/shims/python")
66-
// pip {
67-
// // A requirement specifier, with or without a version number:
68-
// install("requests")
69-
// install("yt-dlp")
70-
// }
71-
// }
72-
//}
73-
74-
//configurations {
75-
// runtimeOnly {
76-
// exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
77-
// exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk7")
78-
// }
79-
//}
8072

8173

8274

8375
dependencies {
8476
implementation("androidx.core:core-ktx:1.10.1")
85-
// {
86-
// exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
87-
// exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk7")
88-
// }
8977
implementation("androidx.appcompat:appcompat:1.6.1")
9078

9179

92-
// implementation("androidx.compose.material:material:1.4.3")
93-
// implementation("androidx.compose.ui:ui:1.4.3")
94-
// implementation("androidx.compose.ui:ui-tooling:1.4.3")
95-
// implementation("androidx.activity:activity-compose:1.7.2")
96-
9780

9881
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
9982
implementation("androidx.test:core-ktx:1.5.0")

app/src/main/java/com/puutaro/commandclick/proccess/ubuntu/UbuntuInfo.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
package com.puutaro.commandclick.proccess.ubuntu
22

3+
import com.puutaro.commandclick.BuildConfig
4+
5+
36
object UbuntuInfo {
47
val user = "cmdclick"
5-
// for development
6-
val onForDev = false
8+
// for development
9+
val onForDev = if(
10+
BuildConfig.DEBUG
11+
) true
12+
else false
713

814
val createImageSwitch = CreateImageSwitch.off.name
915
val arm64UbuntuRootfsUrl =

0 commit comments

Comments
 (0)