diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..c39b81e --- /dev/null +++ b/build.gradle @@ -0,0 +1,25 @@ +buildscript { + ext.kotlin_version = "1.4.10" + repositories { + google() + jcenter() + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:7.0.0-alpha04' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21" + } +} + +allprojects { + repositories { + mavenCentral() + google() + maven { url "https://jitpack.io" } + jcenter() + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index 43f5fc2..0000000 --- a/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -buildscript { - repositories { - google() - jcenter() - mavenCentral() - } - dependencies { - classpath(Config.GradlePlugin) - classpath(Config.KotlinGradlePlugin) - } -} - -allprojects { - repositories { - mavenCentral() - google() - maven { url = uri("https://jitpack.io") } - jcenter() - } -} - -tasks.register("clean", Delete::class) { - delete(rootProject.buildDir) -} \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts deleted file mode 100644 index b22ed73..0000000 --- a/buildSrc/build.gradle.kts +++ /dev/null @@ -1,7 +0,0 @@ -plugins { - `kotlin-dsl` -} - -repositories { - mavenCentral() -} \ No newline at end of file diff --git a/buildSrc/build/kotlin/buildSrcjar-classes.txt b/buildSrc/build/kotlin/buildSrcjar-classes.txt deleted file mode 100644 index 2315a8e..0000000 --- a/buildSrc/build/kotlin/buildSrcjar-classes.txt +++ /dev/null @@ -1 +0,0 @@ -/Users/damir/Rekukler/buildSrc/build/classes/kotlin/main/AndroidX.class:/Users/damir/Rekukler/buildSrc/build/classes/kotlin/main/Config.class:/Users/damir/Rekukler/buildSrc/build/classes/kotlin/main/Modules.class:/Users/damir/Rekukler/buildSrc/build/classes/kotlin/main/Versions.class \ No newline at end of file diff --git a/buildSrc/build/libs/buildSrc.jar b/buildSrc/build/libs/buildSrc.jar deleted file mode 100644 index 0f61345..0000000 Binary files a/buildSrc/build/libs/buildSrc.jar and /dev/null differ diff --git a/buildSrc/build/pluginUnderTestMetadata/plugin-under-test-metadata.properties b/buildSrc/build/pluginUnderTestMetadata/plugin-under-test-metadata.properties deleted file mode 100644 index 1496a16..0000000 --- a/buildSrc/build/pluginUnderTestMetadata/plugin-under-test-metadata.properties +++ /dev/null @@ -1 +0,0 @@ -implementation-classpath=/Users/damir/Rekukler/buildSrc/build/classes/java/main\:/Users/damir/Rekukler/buildSrc/build/classes/groovy/main\:/Users/damir/Rekukler/buildSrc/build/classes/kotlin/main\:/Users/damir/Rekukler/buildSrc/build/resources/main diff --git a/buildSrc/build/reports/plugin-development/validation-report.txt b/buildSrc/build/reports/plugin-development/validation-report.txt deleted file mode 100644 index e69de29..0000000 diff --git a/buildSrc/build/source-roots/buildSrc/source-roots.txt b/buildSrc/build/source-roots/buildSrc/source-roots.txt deleted file mode 100644 index 2d932de..0000000 --- a/buildSrc/build/source-roots/buildSrc/source-roots.txt +++ /dev/null @@ -1,8 +0,0 @@ -src/main/resources -src/main/java -src/main/groovy -src/main/kotlin -src/test/resources -src/test/java -src/test/groovy -src/test/kotlin diff --git a/buildSrc/build/tmp/jar/MANIFEST.MF b/buildSrc/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 59499bc..0000000 --- a/buildSrc/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt deleted file mode 100644 index 99849f6..0000000 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ /dev/null @@ -1,29 +0,0 @@ - -object Versions { - const val GradlePlugin = "7.0.0-alpha04" - const val KotlinGradlePlugin = "1.4.21" - const val Kotlin = "1.4.21" - - const val CoreKtx = "1.3.2" - const val AppCompat = "1.2.0" - const val Material = "1.2.1" - const val AsyncLayoutInflater = "1.0.0" -} - -object Config { - const val compileSdkVersion = 30 - const val buildToolsVersion = "30.0.3" - const val minSdkVersion = 23 - const val targetSdkVersion = 30 - - const val GradlePlugin = "com.android.tools.build:gradle:${Versions.GradlePlugin}" - const val KotlinGradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:${Versions.KotlinGradlePlugin}" - const val Kotlin = "org.jetbrains.kotlin:kotlin-stdlib:${Versions.Kotlin}" -} - -object AndroidX { - const val CoreKtx = "androidx.core:core-ktx:${Versions.CoreKtx}" - const val AppCompat = "androidx.appcompat:appcompat:${Versions.AppCompat}" - const val Material = "com.google.android.material:material:${Versions.Material}" - const val AsyncLayoutInflater = "androidx.asynclayoutinflater:asynclayoutinflater:${Versions.AsyncLayoutInflater}" -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Modules.kt b/buildSrc/src/main/kotlin/Modules.kt deleted file mode 100644 index bef72da..0000000 --- a/buildSrc/src/main/kotlin/Modules.kt +++ /dev/null @@ -1,4 +0,0 @@ -object Modules { - const val Sample = ":sample" - const val Library = ":rekukler" -} \ No newline at end of file diff --git a/rekukler/build.gradle b/rekukler/build.gradle new file mode 100644 index 0000000..9a0719d --- /dev/null +++ b/rekukler/build.gradle @@ -0,0 +1,61 @@ +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'maven-publish' +} + +group = 'com.github.Rere-kt' + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.3" + + defaultConfig { + minSdkVersion 23 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + consumerProguardFiles "consumer-rules.pro" + } + + buildFeatures { + viewBinding true + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation 'androidx.core:core-ktx:1.3.2' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.2.1' + implementation 'androidx.asynclayoutinflater:asynclayoutinflater:1.0.0' + +} + +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + from components.release + groupId = 'com.github.Rere-kt' + artifactId = 'rekukler' + version = '1.0' + } + } + } +} \ No newline at end of file diff --git a/rekukler/build.gradle.kts b/rekukler/build.gradle.kts deleted file mode 100644 index 2170438..0000000 --- a/rekukler/build.gradle.kts +++ /dev/null @@ -1,46 +0,0 @@ -plugins { - id("com.android.library") - kotlin("android") - id("maven-publish") -} - -android { - compileSdkVersion(Config.compileSdkVersion) - buildToolsVersion(Config.buildToolsVersion) - - defaultConfig { - minSdkVersion(Config.minSdkVersion) - targetSdkVersion(Config.targetSdkVersion) - versionCode = 1 - versionName = "1.0" - consumerProguardFiles("consumer-rules.pro") - } - - buildTypes { - getByName("release") { - isMinifyEnabled = false - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = "1.8" - } - - buildFeatures { - viewBinding = true - } -} - -dependencies { - implementation(Config.Kotlin) - implementation(AndroidX.CoreKtx) - implementation(AndroidX.AppCompat) - implementation(AndroidX.Material) - implementation(AndroidX.AsyncLayoutInflater) -} \ No newline at end of file diff --git a/rekukler/proguard-rules.pro b/rekukler/proguard-rules.pro index ff59496..481bb43 100644 --- a/rekukler/proguard-rules.pro +++ b/rekukler/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts. +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/sample/build.gradle b/sample/build.gradle new file mode 100644 index 0000000..bb413bd --- /dev/null +++ b/sample/build.gradle @@ -0,0 +1,43 @@ +plugins { + id 'com.android.application' + id 'kotlin-android' +} + +android { + compileSdkVersion 30 + buildToolsVersion "30.0.2" + + defaultConfig { + applicationId "com.rerekt.sample" + minSdkVersion 23 + targetSdkVersion 30 + versionCode 1 + versionName "1.0" + } + + buildFeatures { + viewBinding true + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } +} + +dependencies { + implementation project(":rekukler") + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + implementation 'androidx.core:core-ktx:1.3.1' + implementation 'androidx.appcompat:appcompat:1.2.0' + implementation 'com.google.android.material:material:1.2.1' +} \ No newline at end of file diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts deleted file mode 100644 index 5ccf8ad..0000000 --- a/sample/build.gradle.kts +++ /dev/null @@ -1,45 +0,0 @@ -plugins { - id("com.android.application") - kotlin("android") -} - -android { - compileSdkVersion(Config.compileSdkVersion) - buildToolsVersion(Config.buildToolsVersion) - - defaultConfig { - applicationId = "com.rerekt.sample" - minSdkVersion(Config.minSdkVersion) - targetSdkVersion(Config.targetSdkVersion) - versionCode = 1 - versionName = "1.0" - } - - buildTypes { - getByName("release") { - isMinifyEnabled = false - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = "1.8" - } - - buildFeatures { - viewBinding = true - } -} - -dependencies { - implementation(project(Modules.Library)) - implementation(Config.Kotlin) - implementation(AndroidX.CoreKtx) - implementation(AndroidX.AppCompat) - implementation(AndroidX.Material) -} \ No newline at end of file diff --git a/sample/proguard-rules.pro b/sample/proguard-rules.pro index d99b33c..481bb43 100644 --- a/sample/proguard-rules.pro +++ b/sample/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle.kts.kts. +# proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..d0bc834 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = "Rekukler" +include ':sample' +include ':rekukler' \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts deleted file mode 100644 index 759732b..0000000 --- a/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "Rekukler" -include(":sample") -include(":rekukler") \ No newline at end of file