Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .idea/artifacts/lib_jvm.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ plugins {
}

android {
compileSdkVersion 33
buildToolsVersion "30.0.3"
compileSdk = 33
buildToolsVersion = "30.0.3"

namespace = "me.onebone.toolbar"

defaultConfig {
applicationId "me.onebone.toolbar"
Expand All @@ -30,15 +32,9 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_compiler_version
}
}

dependencies {
Expand Down
21 changes: 8 additions & 13 deletions build.gradle → build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
library_version = '2.3.5'

kotlin_version = '1.7.20'
compose_compiler_version = '1.3.2'
}
plugins {
kotlin("multiplatform") version "1.9.0" apply false
kotlin("android") version "1.9.0" apply false
id("org.jetbrains.compose") version "1.4.3" apply false
}

buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath("com.android.tools.build:gradle:8.0.2")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -26,7 +25,3 @@ allprojects {
mavenCentral()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ afterEvaluate {
release(MavenPublication) {
groupId = 'me.onebone'
artifactId = 'toolbar-compose'
version = rootProject.ext.library_version
version = "2.3.5"

from components.release

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
61 changes: 0 additions & 61 deletions lib/build.gradle

This file was deleted.

49 changes: 49 additions & 0 deletions lib/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
plugins {
kotlin("multiplatform")
id("com.android.library")
id("org.jetbrains.compose")
}

kotlin {
androidTarget("android")
jvm()

sourceSets {
val commonMain by getting {
dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
}
}

val androidMain by getting {
dependsOn(commonMain)
}

val jvmMain by getting {
dependsOn(commonMain)
}
}
}

android {
namespace = "me.onebone.toolbar"

compileSdk = 33

defaultConfig {
minSdkVersion(21)

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

packagingOptions {
exclude("META-INF/AL2.0")
exclude("META-INF/LGPL2.1")
}
}

2 changes: 1 addition & 1 deletion lib/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
105 changes: 0 additions & 105 deletions lib/src/androidTest/java/me/onebone/toolbar/CollapsingToolbarTest.kt

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

package me.onebone.toolbar

import androidx.annotation.FloatRange
import androidx.compose.animation.core.AnimationState
import androidx.compose.animation.core.animateTo
import androidx.compose.animation.core.tween
Expand Down Expand Up @@ -97,7 +96,6 @@ class CollapsingToolbarState(
private var minHeightState by mutableStateOf(0)

val progress: Float
@FloatRange(from = 0.0, to = 1.0)
get() =
if(minHeight == maxHeight) {
0f
Expand Down
17 changes: 0 additions & 17 deletions lib/src/test/java/me/onebone/toolbar/ExampleUnitTest.kt

This file was deleted.

4 changes: 2 additions & 2 deletions settings.gradle → settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include ':lib'
include ':app'
include(":lib")
include(":app")
rootProject.name = "Collapsing Toolbar"