diff --git a/src/Android/.gitignore b/Android/.gitignore similarity index 100% rename from src/Android/.gitignore rename to Android/.gitignore diff --git a/Android/build.gradle b/Android/build.gradle new file mode 100644 index 0000000..f722a11 --- /dev/null +++ b/Android/build.gradle @@ -0,0 +1,84 @@ +apply plugin: 'com.android.library' +apply plugin: 'maven-publish' + +allprojects { + repositories { + // The order in which you list these repositories matter. + google() + jcenter() + maven { + url "https://jitpack.io" + } + } +} + +buildscript{ + repositories{ + google() + jcenter() + maven { + url "https://jitpack.io" + } + } + + dependencies{ + classpath "com.android.tools.build:gradle:7.0.2" + } +} + +android { + compileSdk 32 + + defaultConfig { + minSdk 21 + targetSdk 32 + versionCode 1 + versionName "0.1.0" + + } + + + lintOptions { + abortOnError false + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + + +// Because the components are created only during the afterEvaluate phase, you must +// configure your publications using the afterEvaluate() lifecycle method. +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release + + // You can then customize attributes of the publication as shown below. + groupId = 'com.github.alibaba' + artifactId = 'gaia-motion-curve' + version = '0.1.0' + } + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.debug + + groupId = 'com.github.alibaba' + artifactId = 'gaia-motion-curve' + version = '0.1.0-DEV' + } + } + } +} \ No newline at end of file diff --git a/src/Android/gradle.properties b/Android/gradle.properties similarity index 100% rename from src/Android/gradle.properties rename to Android/gradle.properties diff --git a/src/Android/gradle/wrapper/gradle-wrapper.jar b/Android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from src/Android/gradle/wrapper/gradle-wrapper.jar rename to Android/gradle/wrapper/gradle-wrapper.jar diff --git a/src/Android/gradle/wrapper/gradle-wrapper.properties b/Android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from src/Android/gradle/wrapper/gradle-wrapper.properties rename to Android/gradle/wrapper/gradle-wrapper.properties diff --git a/src/Android/gradlew b/Android/gradlew similarity index 100% rename from src/Android/gradlew rename to Android/gradlew diff --git a/src/Android/gradlew.bat b/Android/gradlew.bat similarity index 100% rename from src/Android/gradlew.bat rename to Android/gradlew.bat diff --git a/src/Android/proguard-rules.pro b/Android/proguard-rules.pro similarity index 100% rename from src/Android/proguard-rules.pro rename to Android/proguard-rules.pro diff --git a/src/Android/src/main/AndroidManifest.xml b/Android/src/main/AndroidManifest.xml similarity index 100% rename from src/Android/src/main/AndroidManifest.xml rename to Android/src/main/AndroidManifest.xml diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAccelerateInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAccelerateInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAccelerateInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAccelerateInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAnticipateInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAnticipateInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAnticipateInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAnticipateInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveBounceInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveBounceInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveBounceInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveBounceInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCosineInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCosineInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCosineInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCosineInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCubicBezierInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCubicBezierInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCubicBezierInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCubicBezierInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveDecelerateInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveDecelerateInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveDecelerateInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveDecelerateInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveLinearInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveLinearInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveLinearInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveLinearInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveOvershootInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveOvershootInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveOvershootInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveOvershootInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveSpringInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveSpringInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveSpringInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveSpringInterpolator.java diff --git a/src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveStandardInterpolator.java b/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveStandardInterpolator.java similarity index 100% rename from src/Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveStandardInterpolator.java rename to Android/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveStandardInterpolator.java diff --git a/src/Android/src/main/res/values/strings.xml b/Android/src/main/res/values/strings.xml similarity index 100% rename from src/Android/src/main/res/values/strings.xml rename to Android/src/main/res/values/strings.xml diff --git a/src/iOS/GaiaMotionCurve.podspec b/iOS/GaiaMotionCurve.podspec similarity index 87% rename from src/iOS/GaiaMotionCurve.podspec rename to iOS/GaiaMotionCurve.podspec index ebea566..00f9497 100644 --- a/src/iOS/GaiaMotionCurve.podspec +++ b/iOS/GaiaMotionCurve.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "GaiaMotionCurve" - s.version = "0.1.0" + s.version = "0.1.1" s.summary = "a library to solve the problems of high cost of developing dynamic effects and inconsistent effects and design expectations" s.license = { :type => 'Apache License, Version 2.0' } s.homepage = "https://github.com/alibaba/gaia-motion-curve" @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/alibaba/gaia-motion-curve.git", :tag => s.version } - s.source_files = 'src/iOS/GaiaMotionCurve/**/*.{h,m,mm,c}' + s.source_files = 'iOS/GaiaMotionCurve/**/*.{h,m,mm,c}' s.xcconfig = { "ENABLE_BITCODE" => "NO" } s.requires_arc = true end diff --git a/src/iOS/GaiaMotionCurve.xcodeproj/project.pbxproj b/iOS/GaiaMotionCurve.xcodeproj/project.pbxproj similarity index 100% rename from src/iOS/GaiaMotionCurve.xcodeproj/project.pbxproj rename to iOS/GaiaMotionCurve.xcodeproj/project.pbxproj diff --git a/src/iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.h b/iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.h similarity index 100% rename from src/iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.h rename to iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.h diff --git a/src/iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.m b/iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.m similarity index 100% rename from src/iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.m rename to iOS/GaiaMotionCurve/CALayer+GaiaMotionCurve.m diff --git a/src/iOS/GaiaMotionCurve/GMCDefines.h b/iOS/GaiaMotionCurve/GMCDefines.h similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCDefines.h rename to iOS/GaiaMotionCurve/GMCDefines.h diff --git a/src/iOS/GaiaMotionCurve/GMCFunctions.h b/iOS/GaiaMotionCurve/GMCFunctions.h similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCFunctions.h rename to iOS/GaiaMotionCurve/GMCFunctions.h diff --git a/src/iOS/GaiaMotionCurve/GMCFunctions.m b/iOS/GaiaMotionCurve/GMCFunctions.m similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCFunctions.m rename to iOS/GaiaMotionCurve/GMCFunctions.m diff --git a/src/iOS/GaiaMotionCurve/GMCHelper.h b/iOS/GaiaMotionCurve/GMCHelper.h similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCHelper.h rename to iOS/GaiaMotionCurve/GMCHelper.h diff --git a/src/iOS/GaiaMotionCurve/GMCHelper.m b/iOS/GaiaMotionCurve/GMCHelper.m similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCHelper.m rename to iOS/GaiaMotionCurve/GMCHelper.m diff --git a/src/iOS/GaiaMotionCurve/GMCModel+Internal.h b/iOS/GaiaMotionCurve/GMCModel+Internal.h similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCModel+Internal.h rename to iOS/GaiaMotionCurve/GMCModel+Internal.h diff --git a/src/iOS/GaiaMotionCurve/GMCModel+Internal.m b/iOS/GaiaMotionCurve/GMCModel+Internal.m similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCModel+Internal.m rename to iOS/GaiaMotionCurve/GMCModel+Internal.m diff --git a/src/iOS/GaiaMotionCurve/GMCModel.h b/iOS/GaiaMotionCurve/GMCModel.h similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCModel.h rename to iOS/GaiaMotionCurve/GMCModel.h diff --git a/src/iOS/GaiaMotionCurve/GMCModel.m b/iOS/GaiaMotionCurve/GMCModel.m similarity index 100% rename from src/iOS/GaiaMotionCurve/GMCModel.m rename to iOS/GaiaMotionCurve/GMCModel.m diff --git a/src/iOS/GaiaMotionCurve/GaiaMotionCurve.h b/iOS/GaiaMotionCurve/GaiaMotionCurve.h similarity index 100% rename from src/iOS/GaiaMotionCurve/GaiaMotionCurve.h rename to iOS/GaiaMotionCurve/GaiaMotionCurve.h diff --git a/src/iOS/GaiaMotionCurve/NSValue+GMCCGFloat.h b/iOS/GaiaMotionCurve/NSValue+GMCCGFloat.h similarity index 100% rename from src/iOS/GaiaMotionCurve/NSValue+GMCCGFloat.h rename to iOS/GaiaMotionCurve/NSValue+GMCCGFloat.h diff --git a/src/iOS/GaiaMotionCurve/NSValue+GMCCGFloat.m b/iOS/GaiaMotionCurve/NSValue+GMCCGFloat.m similarity index 100% rename from src/iOS/GaiaMotionCurve/NSValue+GMCCGFloat.m rename to iOS/GaiaMotionCurve/NSValue+GMCCGFloat.m diff --git a/src/iOS/GaiaMotionCurve/NSValue+GMCUIColor.h b/iOS/GaiaMotionCurve/NSValue+GMCUIColor.h similarity index 100% rename from src/iOS/GaiaMotionCurve/NSValue+GMCUIColor.h rename to iOS/GaiaMotionCurve/NSValue+GMCUIColor.h diff --git a/src/iOS/GaiaMotionCurve/NSValue+GMCUIColor.m b/iOS/GaiaMotionCurve/NSValue+GMCUIColor.m similarity index 100% rename from src/iOS/GaiaMotionCurve/NSValue+GMCUIColor.m rename to iOS/GaiaMotionCurve/NSValue+GMCUIColor.m diff --git a/src/iOS/GaiaMotionCurveTests/GaiaMotionCurveTests.m b/iOS/GaiaMotionCurveTests/GaiaMotionCurveTests.m similarity index 100% rename from src/iOS/GaiaMotionCurveTests/GaiaMotionCurveTests.m rename to iOS/GaiaMotionCurveTests/GaiaMotionCurveTests.m diff --git a/src/iOS/Podfile b/iOS/Podfile similarity index 100% rename from src/iOS/Podfile rename to iOS/Podfile diff --git a/src/Android/build.gradle b/src/Android/build.gradle deleted file mode 100644 index ff1ee46..0000000 --- a/src/Android/build.gradle +++ /dev/null @@ -1,92 +0,0 @@ -apply plugin: 'com.android.library' -apply plugin: 'maven-publish' - -def githubProperties = new Properties() -githubProperties.load(new FileInputStream(rootProject.file("github.properties"))) - -def getVersionName = { -> - return "0.1.0" -} - -def getArtificatId = { -> - return "gaia-motion-curve" -} - -allprojects { - repositories { - // The order in which you list these repositories matter. - google() - jcenter() - } -} - -buildscript{ - repositories{ - google() - jcenter() - } - - dependencies{ - classpath "com.android.tools.build:gradle:7.0.2" - } -} - -android { - compileSdk 32 - - defaultConfig { - minSdk 21 - targetSdk 32 - versionCode 1 - versionName "0.1.0" - - } - - - lintOptions { - abortOnError false - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - libraryVariants.all { variant -> - variant.outputs.all { output -> - if (outputFile != null && outputFileName.endsWith('.aar')) { - outputFileName = "${getArtificatId()}-release.aar" - } - } - } -} - -publishing { - publications { - bar(MavenPublication) { - groupId 'com.gaia.libraries' - artifactId getArtificatId() - version getVersionName() - artifact("$buildDir/outputs/aar/${getArtificatId()}-release.aar") - } - } - - repositories { - maven { - name = "GitHubPackages" - - url = uri("https://maven.pkg.github.com/alibaba/gaia-motion-curve") - - credentials { - username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER") - password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY") - } - } - } -} \ No newline at end of file