-
Notifications
You must be signed in to change notification settings - Fork 205
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): replaced the buildSrc plugin with a simplified Versions…
… object and moved the build structure down into the individual modules
- Loading branch information
Showing
18 changed files
with
527 additions
and
384 deletions.
There are no files selected for viewing
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,14 +1,22 @@ | ||
plugins { | ||
id("bugsnag-build-plugin") | ||
id("com.android.library") | ||
load(Versions.Plugins.AGP) | ||
load(Versions.Plugins.checkstyle) | ||
} | ||
|
||
bugsnagBuildOptions { | ||
compilesCode = false | ||
android { | ||
compileSdk = Versions.Android.Build.compileSdkVersion | ||
namespace = "com.bugsnag.android" | ||
|
||
defaultConfig { | ||
minSdk = Versions.Android.Build.minSdkVersion | ||
ndkVersion = Versions.Android.Build.ndk | ||
} | ||
} | ||
|
||
dependencies { | ||
add("api", project(":bugsnag-android-core")) | ||
add("api", project(":bugsnag-plugin-android-anr")) | ||
add("api", project(":bugsnag-plugin-android-ndk")) | ||
} | ||
|
||
configureCheckstyle() |
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,13 +1,70 @@ | ||
plugins { | ||
id("bugsnag-build-plugin") | ||
loadDefaultPlugins() | ||
} | ||
|
||
bugsnagBuildOptions { | ||
usesNdk = true | ||
} | ||
android { | ||
compileSdk = Versions.Android.Build.compileSdkVersion | ||
namespace = "com.bugsnag.android.anr" | ||
|
||
defaultConfig { | ||
minSdk = Versions.Android.Build.minSdkVersion | ||
ndkVersion = Versions.Android.Build.ndk | ||
|
||
consumerProguardFiles("proguard-rules.pro") | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
externalNativeBuild.cmake.arguments += listOf( | ||
"-DANDROID_CPP_FEATURES=exceptions", | ||
"-DANDROID_STL=c++_static" | ||
) | ||
|
||
configureAbis(ndk.abiFilters) | ||
} | ||
|
||
lint { | ||
isAbortOnError = true | ||
isWarningsAsErrors = true | ||
isCheckAllWarnings = true | ||
baseline(File(project.projectDir, "lint-baseline.xml")) | ||
disable("GradleDependency", "NewerVersionAvailable") | ||
} | ||
|
||
buildFeatures { | ||
aidl = false | ||
renderScript = false | ||
shaders = false | ||
resValues = false | ||
buildConfig = false | ||
} | ||
|
||
apply(plugin = "com.android.library") | ||
compileOptions { | ||
sourceCompatibility = Versions.java | ||
targetCompatibility = Versions.java | ||
} | ||
|
||
testOptions { | ||
unitTests { | ||
isReturnDefaultValues = true | ||
} | ||
} | ||
|
||
sourceSets { | ||
named("test") { | ||
java.srcDir(SHARED_TEST_SRC_DIR) | ||
} | ||
} | ||
|
||
externalNativeBuild.cmake.path = project.file("CMakeLists.txt") | ||
externalNativeBuild.cmake.version = Versions.Android.Build.cmakeVersion | ||
} | ||
|
||
dependencies { | ||
addCommonModuleDependencies() | ||
add("api", project(":bugsnag-android-core")) | ||
} | ||
|
||
apply(from = rootProject.file("gradle/detekt.gradle")) | ||
apply(from = rootProject.file("gradle/license-check.gradle")) | ||
apply(from = rootProject.file("gradle/release.gradle")) | ||
|
||
configureCheckstyle() |
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
Oops, something went wrong.