-
Notifications
You must be signed in to change notification settings - Fork 301
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 #311 from DanielMartinus/enhancement/move-gradle-t…
…o-kotlin-dsl Move gradle build files of sample apps to kotlin dsl
- Loading branch information
Showing
23 changed files
with
311 additions
and
300 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} |
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,5 @@ | ||
object Constants { | ||
const val composeVersion = "1.4.3" | ||
const val konfettiVersion = "2.0.3" | ||
const val kotlinVersion = "1.8.10" | ||
} |
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,74 +1,74 @@ | ||
plugins { | ||
id 'com.android.library' | ||
id 'kotlin-android' | ||
id 'com.diffplug.spotless' | ||
id "com.android.library" | ||
id "kotlin-android" | ||
id "com.diffplug.spotless" | ||
} | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'nl.dionsegijn' | ||
PUBLISH_GROUP_ID = "nl.dionsegijn" | ||
PUBLISH_VERSION = konfetti_version | ||
PUBLISH_ARTIFACT_ID = 'konfetti-compose' | ||
PUBLISH_ARTIFACT_ID = "konfetti-compose" | ||
} | ||
|
||
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" | ||
|
||
spotless { | ||
kotlin { | ||
ktlint("0.37.2") | ||
target 'src/**/*.kt' | ||
target "src/**/*.kt" | ||
} | ||
java { | ||
removeUnusedImports() | ||
googleJavaFormat("1.5") | ||
target '**/*.java' | ||
target "**/*.java" | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 33 | ||
buildToolsVersion "34.0.0" | ||
compileSdkVersion = 33 | ||
buildToolsVersion = "34.0.0" | ||
|
||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
jvmTarget = "1.8" | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion 21 | ||
targetSdkVersion 33 | ||
minSdk = 21 | ||
targetSdk = 33 | ||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
minifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
|
||
buildFeatures { | ||
compose true | ||
compose = true | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion compose_version | ||
kotlinCompilerExtensionVersion = compose_version | ||
} | ||
namespace 'nl.dionsegijn.konfetti.compose' | ||
namespace = "nl.dionsegijn.konfetti.compose" | ||
} | ||
|
||
dependencies { | ||
debugApi project(path: ':konfetti:core') | ||
releaseApi "nl.dionsegijn:konfetti-core:$konfetti_version" | ||
debugApi(project(path: ":konfetti:core")) | ||
releaseApi("nl.dionsegijn:konfetti-core:$konfetti_version") | ||
|
||
implementation "androidx.compose.foundation:foundation:$compose_version" | ||
implementation "androidx.compose.ui:ui:$compose_version" | ||
implementation("androidx.compose.foundation:foundation:$compose_version") | ||
implementation("androidx.compose.ui:ui:$compose_version") | ||
|
||
testImplementation 'junit:junit:4.13.2' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.5' | ||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$compose_version") | ||
} |
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,61 +1,61 @@ | ||
plugins { | ||
id 'com.android.library' | ||
id 'kotlin-android' | ||
id 'com.diffplug.spotless' | ||
id "com.android.library" | ||
id "kotlin-android" | ||
id "com.diffplug.spotless" | ||
} | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'nl.dionsegijn' | ||
PUBLISH_GROUP_ID = "nl.dionsegijn" | ||
PUBLISH_VERSION = konfetti_version | ||
PUBLISH_ARTIFACT_ID = 'konfetti-core' | ||
PUBLISH_ARTIFACT_ID = "konfetti-core" | ||
} | ||
|
||
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" | ||
|
||
spotless { | ||
kotlin { | ||
ktlint("0.37.2") | ||
target 'src/**/*.kt' | ||
target "src/**/*.kt" | ||
} | ||
java { | ||
removeUnusedImports() | ||
googleJavaFormat("1.5") | ||
target '**/*.java' | ||
target "**/*.java" | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 33 | ||
buildToolsVersion "34.0.0" | ||
compileSdkVersion = 33 | ||
buildToolsVersion = "34.0.0" | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
jvmTarget = "1.8" | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion 15 | ||
targetSdkVersion 33 | ||
minSdk = 15 | ||
targetSdk = 33 | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
minifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
namespace 'nl.dionsegijn.konfetti.core' | ||
namespace = "nl.dionsegijn.konfetti.core" | ||
lint { | ||
abortOnError true | ||
baseline file('lint-baseline.xml') | ||
abortOnError = true | ||
baseline(file("lint-baseline.xml")) | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
testImplementation 'junit:junit:4.13.2' | ||
testImplementation 'org.mockito:mockito-core:3.11.2' | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") | ||
testImplementation("junit:junit:4.13.2") | ||
testImplementation("org.mockito:mockito-core:3.11.2") | ||
} |
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,62 +1,62 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: "com.android.library" | ||
apply plugin: "kotlin-android" | ||
apply plugin: "com.diffplug.spotless" | ||
|
||
ext { | ||
PUBLISH_GROUP_ID = 'nl.dionsegijn' | ||
PUBLISH_GROUP_ID = "nl.dionsegijn" | ||
PUBLISH_VERSION = konfetti_version | ||
PUBLISH_ARTIFACT_ID = 'konfetti-xml' | ||
PUBLISH_ARTIFACT_ID = "konfetti-xml" | ||
} | ||
|
||
apply from: "${rootProject.projectDir}/scripts/publish-module.gradle" | ||
|
||
spotless { | ||
kotlin { | ||
ktlint("0.37.2") | ||
target 'src/**/*.kt' | ||
target "src/**/*.kt" | ||
} | ||
java { | ||
removeUnusedImports() | ||
googleJavaFormat("1.5") | ||
target '**/*.java' | ||
target "**/*.java" | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 33 | ||
buildToolsVersion "34.0.0" | ||
compileSdkVersion = 33 | ||
buildToolsVersion = "34.0.0" | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = '1.8' | ||
jvmTarget = "1.8" | ||
} | ||
|
||
defaultConfig { | ||
minSdkVersion 15 | ||
targetSdkVersion 33 | ||
minSdk = 15 | ||
targetSdk = 33 | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
minifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
namespace 'nl.dionsegijn.konfetti.xml' | ||
namespace = "nl.dionsegijn.konfetti.xml" | ||
lint { | ||
abortOnError true | ||
baseline file('lint-baseline.xml') | ||
abortOnError = true | ||
baseline(file("lint-baseline.xml")) | ||
} | ||
} | ||
|
||
dependencies { | ||
debugApi project(path: ':konfetti:core') | ||
releaseApi "nl.dionsegijn:konfetti-core:$konfetti_version" | ||
debugApi(project(path: ":konfetti:core")) | ||
releaseApi("nl.dionsegijn:konfetti-core:$konfetti_version") | ||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | ||
testImplementation 'junit:junit:4.13.2' | ||
testImplementation 'org.mockito:mockito-core:3.11.2' | ||
implementation("org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version") | ||
testImplementation("junit:junit:4.13.2") | ||
testImplementation("org.mockito:mockito-core:3.11.2") | ||
} |
Oops, something went wrong.