-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from RedMadRobot/feature/convention_plugin
Build: Migrate to ksp and create basic plugin convention
- Loading branch information
Showing
18 changed files
with
75 additions
and
225 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
buildSrc/src/main/kotlin/convention.debug.panel.plugin.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import internal.Versions | ||
import internal.android | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("convention-publish") | ||
kotlin("android") | ||
} | ||
|
||
android { | ||
compileSdk = Versions.COMPILE_SDK | ||
lint.targetSdk = Versions.TARGET_SDK | ||
|
||
defaultConfig { | ||
minSdk = Versions.MIN_SDK | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
compilerOptions { | ||
jvmTarget = JvmTarget.JVM_11 | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(project(":panel-core")) | ||
implementation(project(":panel-common")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package internal | ||
|
||
internal object Versions { | ||
const val MIN_SDK = 21 | ||
const val TARGET_SDK = 34 | ||
const val COMPILE_SDK = TARGET_SDK | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package internal | ||
|
||
import com.android.build.api.dsl.LibraryExtension | ||
import org.gradle.api.plugins.ExtensionAware | ||
import com.android.build.api.dsl.CommonExtension | ||
import org.gradle.api.Project | ||
|
||
internal fun ExtensionAware.android(configure: LibraryExtension.() -> Unit) { | ||
extensions.configure<LibraryExtension>("android", configure) | ||
internal fun Project.android(configure: CommonExtension<*, *, *, *, *, *>.() -> Unit) { | ||
extensions.configure("android", configure) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,19 @@ | ||
plugins { | ||
id(Plugins.Android.libraryPlagin) | ||
kotlin(Plugins.Kotlin.androidPlugin) | ||
kotlin(Plugins.Kotlin.kapt) | ||
id("convention.debug.panel.plugin") | ||
alias(stack.plugins.ksp) | ||
alias(stack.plugins.kotlin.compose) | ||
id("convention-publish") | ||
} | ||
|
||
description = "Plugin for switching user accounts" | ||
|
||
android { | ||
compileSdk = Project.COMPILE_SDK | ||
lint.targetSdk = Project.TARGET_SDK | ||
|
||
defaultConfig { | ||
minSdk = Project.MIN_SDK | ||
|
||
consumerProguardFile("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
getByName(Project.BuildTypes.release) { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile(Project.Proguard.androidOptimizedRules), | ||
Project.Proguard.projectRules | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
|
||
kapt { | ||
arguments { | ||
arg("room.schemaLocation", "$projectDir/schemas") | ||
} | ||
ksp { | ||
arg("room.schemaLocation", "$projectDir/schemas") | ||
} | ||
|
||
namespace = "com.redmadrobot.debug.plugin.accounts" | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
} | ||
|
||
dependencies { | ||
implementation(kotlin("stdlib")) | ||
implementation(project(":panel-core")) | ||
implementation(project(":panel-common")) | ||
kapt(androidx.room.compiler) | ||
ksp(androidx.room.compiler) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,10 @@ | ||
plugins { | ||
id(Plugins.Android.libraryPlagin) | ||
kotlin(Plugins.Kotlin.androidPlugin) | ||
kotlin(Plugins.Kotlin.kapt) | ||
id("convention.debug.panel.plugin") | ||
alias(stack.plugins.kotlin.compose) | ||
id("convention-publish") | ||
} | ||
|
||
description = "Plugin that helps to change the values of shared preferences" | ||
|
||
android { | ||
compileSdk = Project.COMPILE_SDK | ||
lint.targetSdk = Project.TARGET_SDK | ||
|
||
defaultConfig { | ||
minSdk = Project.MIN_SDK | ||
|
||
consumerProguardFile("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
getByName(Project.BuildTypes.release) { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile(Project.Proguard.androidOptimizedRules), | ||
Project.Proguard.projectRules | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
|
||
namespace = "com.redmadrobot.debug.plugin.appsettings" | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
} | ||
|
||
dependencies { | ||
implementation(project(":panel-core")) | ||
implementation(project(":panel-common")) | ||
implementation(kotlin("stdlib")) | ||
kapt(androidx.room.compiler) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,14 @@ | ||
plugins { | ||
id(Plugins.Android.libraryPlagin) | ||
kotlin(Plugins.Kotlin.androidPlugin) | ||
kotlin(Plugins.Kotlin.kapt) | ||
id("convention.debug.panel.plugin") | ||
alias(stack.plugins.kotlin.compose) | ||
id("convention-publish") | ||
} | ||
|
||
description = "Plugin for flipper library integration" | ||
|
||
android { | ||
compileSdk = Project.COMPILE_SDK | ||
lint.targetSdk = Project.TARGET_SDK | ||
|
||
defaultConfig { | ||
minSdk = Project.MIN_SDK | ||
|
||
consumerProguardFile("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
getByName(Project.BuildTypes.release) { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile(Project.Proguard.androidOptimizedRules), | ||
Project.Proguard.projectRules | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
freeCompilerArgs += "-Xexplicit-api=strict" | ||
} | ||
|
||
namespace = "com.redmadrobot.debug.plugin.flipper" | ||
} | ||
|
||
dependencies { | ||
implementation(project(":panel-core")) | ||
implementation(project(":panel-common")) | ||
implementation(androidx.lifecycle.runtime) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,14 @@ | ||
plugins { | ||
id(Plugins.Android.libraryPlagin) | ||
kotlin(Plugins.Kotlin.androidPlugin) | ||
kotlin(Plugins.Kotlin.kapt) | ||
id("convention.debug.panel.plugin") | ||
alias(stack.plugins.kotlin.compose) | ||
id("convention-publish") | ||
} | ||
|
||
description = "Plugin for konfeature library integration" | ||
|
||
android { | ||
compileSdk = Project.COMPILE_SDK | ||
lint.targetSdk = Project.TARGET_SDK | ||
|
||
defaultConfig { | ||
minSdk = Project.MIN_SDK | ||
|
||
consumerProguardFile("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
getByName(Project.BuildTypes.release) { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile(Project.Proguard.androidOptimizedRules), | ||
Project.Proguard.projectRules | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
freeCompilerArgs += "-Xexplicit-api=strict" | ||
} | ||
|
||
namespace = "com.redmadrobot.debug.plugin.konfeature" | ||
} | ||
|
||
dependencies { | ||
implementation(project(":panel-core")) | ||
implementation(project(":panel-common")) | ||
implementation(androidx.lifecycle.runtime) | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,16 @@ | ||
plugins { | ||
id(Plugins.Android.libraryPlagin) | ||
kotlin(Plugins.Kotlin.androidPlugin) | ||
kotlin(Plugins.Kotlin.kapt) | ||
id("convention.debug.panel.plugin") | ||
alias(stack.plugins.ksp) | ||
alias(stack.plugins.kotlin.compose) | ||
id("convention-publish") | ||
} | ||
|
||
description = "Plugin for switching server hosts" | ||
|
||
android { | ||
compileSdk = Project.COMPILE_SDK | ||
lint.targetSdk = Project.TARGET_SDK | ||
|
||
defaultConfig { | ||
minSdk = Project.MIN_SDK | ||
|
||
consumerProguardFile("consumer-rules.pro") | ||
} | ||
|
||
buildTypes { | ||
getByName(Project.BuildTypes.release) { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile(Project.Proguard.androidOptimizedRules), | ||
Project.Proguard.projectRules | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_11.toString() | ||
} | ||
|
||
namespace = "com.redmadrobot.debug.plugin.servers" | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
} | ||
|
||
dependencies { | ||
implementation(project(":panel-core")) | ||
implementation(project(":panel-common")) | ||
implementation(kotlin("stdlib")) | ||
implementation(stack.kotlinx.serialization.json) | ||
kapt(androidx.room.compiler) | ||
ksp(androidx.room.compiler) | ||
} |
Empty file.
Oops, something went wrong.