Skip to content

Commit

Permalink
.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jawnnypoo committed Jan 17, 2024
1 parent a047ec6 commit 62bc964
Show file tree
Hide file tree
Showing 13 changed files with 169 additions and 120 deletions.
62 changes: 0 additions & 62 deletions app/build.gradle

This file was deleted.

69 changes: 69 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
plugins {
id("com.android.application")
id("kotlin-android")
}

android {
namespace = "com.jawnnypoo.physicslayout.sample"
compileSdk = 34

defaultConfig {
applicationId = "com.jawnnypoo.physicslayout.sample"
minSdk = 21
targetSdk = 34
versionCode = 101
versionName = "1.0.1"
}

buildFeatures {
viewBinding = true
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles("proguard-rules.pro", getDefaultProguardFile("proguard-android.txt"))
}
getByName("debug") {
isMinifyEnabled = false
isShrinkResources = false
proguardFiles("proguard-rules.pro", getDefaultProguardFile("proguard-android.txt"))
}
}

}

kotlin {
jvmToolchain(17)
}

dependencies {
implementation(libs.coroutines.core)
implementation(libs.coroutines.android)

implementation(libs.androidx.activity)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.lifecycle.viewmodel)

implementation(libs.google.material)

implementation(libs.circle.image.view)

implementation(libs.coil)

implementation(libs.retrofit)
implementation(libs.retrofit.moshi)

implementation(libs.moshi)

//https://github.com/blazsolar/FlowLayout/issues/31
implementation(libs.flowlayout) {
exclude(group = "com.intellij", module = "annotations")
}


implementation(libs.gimbal)

implementation(project(":physicslayout"))
}
2 changes: 1 addition & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# By default, the flags in this file are appended to flags specified
# in Z:\Code\ADT\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# directive in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jawnnypoo.physicslayout.sample" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true">
Expand All @@ -20,7 +19,7 @@
</intent-filter>
</activity>

<activity android:name=".AboutActivity"/>
<activity android:name=".AboutActivity" />

</application>

Expand Down
20 changes: 0 additions & 20 deletions build.gradle

This file was deleted.

6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
plugins {
alias(libs.plugins.com.android.application) apply false
alias(libs.plugins.com.android.library) apply false
alias(libs.plugins.org.jetbrains.kotlin.android) apply false
alias(libs.plugins.com.vanniktech.publish) apply false
}
38 changes: 38 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[versions]
org-jetbrains-kotlin-android = "1.9.10"
agp = "8.2.1"
coroutines = "1.7.1"
retrofit = "2.9.0"

[libraries]
jbox2d = { group = "org.jbox2d", name = "jbox2d-library", version = "2.2.1.1" }
translation-drag-view-helper = { group = "com.commit451", name = "translationviewdraghelper", version = "2.0.3" }

coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }

androidx-activity = { group = "androidx.activity", name = "activity-ktx", version = "1.8.2" }
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version = "1.6.1" }
androidx-lifecycle-viewmodel = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version = "2.7.0" }

google-material = { group = "com.google.android.material", name = "material", version = "1.11.0" }

circle-image-view = { group = "de.hdodenhof", name = "circleimageview", version = "3.1.0" }

coil = { group = "io.coil-kt", name = "coil", version = "1.1.1" }

retrofit = { group = "com.squareup.retrofit2", name = "retrofit", version.ref = "retrofit" }
retrofit-moshi = { group = "com.squareup.retrofit2", name = "converter-moshi", version.ref = "retrofit" }

moshi = { group = "com.squareup.moshi", name = "moshi-kotlin", version = "1.13.0" }

flowlayout = { group = "com.wefika", name = "flowlayout", version = "0.4.1" }

gimbal = { group = "com.github.Commit451", name = "Gimbal", version = "3.0.0" }


[plugins]
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "org-jetbrains-kotlin-android" }
com-android-application = { id = "com.android.application", version.ref = "agp" }
com-android-library = { id = "com.android.library", version.ref = "agp" }
com-vanniktech-publish = { id = "com.vanniktech.maven.publish", version = "0.18.0" }
23 changes: 0 additions & 23 deletions physicslayout/build.gradle

This file was deleted.

32 changes: 32 additions & 0 deletions physicslayout/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
alias(libs.plugins.com.android.library)
alias(libs.plugins.org.jetbrains.kotlin.android)
alias(libs.plugins.com.vanniktech.publish)
}

android {
namespace = "com.jawnnypoo.physicslayout"
compileSdk = 34

defaultConfig {
minSdk = 15
}
}

kotlin {
jvmToolchain(17)
}

dependencies {
api(libs.jbox2d)
api(libs.translation.drag.view.helper)
}

mavenPublish {
sonatypeHost = SonatypeHost.S01
// We need this, because on Jitpack, we don't want the release to be signed,
// but on GitHub actions, we do, since it will be published to Maven Central
releaseSigningEnabled = System.getenv("RELEASE_SIGNING_ENABLED") == "true"
}
2 changes: 1 addition & 1 deletion physicslayout/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# By default, the flags in this file are appended to flags specified
# in Z:/Code/ADT/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
# directive in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
6 changes: 0 additions & 6 deletions publish.gradle

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle

This file was deleted.

17 changes: 17 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven(url = "https://jitpack.io")
}
}

include(":app", ":physicslayout")

0 comments on commit 62bc964

Please sign in to comment.