From 94e55a0a57f7c4f947adbbcb85a8c5ccc7f3da5e Mon Sep 17 00:00:00 2001 From: biezhihua Date: Fri, 11 Mar 2022 17:32:30 +0800 Subject: [PATCH 1/3] feat: publish jitpack config --- src/Android/build.gradle | 66 ++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/src/Android/build.gradle b/src/Android/build.gradle index ff1ee46..f722a11 100644 --- a/src/Android/build.gradle +++ b/src/Android/build.gradle @@ -1,22 +1,14 @@ 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() + maven { + url "https://jitpack.io" + } } } @@ -24,6 +16,9 @@ buildscript{ repositories{ google() jcenter() + maven { + url "https://jitpack.io" + } } dependencies{ @@ -57,35 +52,32 @@ android { 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") +// 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' } } } From 66e77bddfd93dcb8058b6f81e92f07267a3a0ec6 Mon Sep 17 00:00:00 2001 From: biezhihua Date: Fri, 11 Mar 2022 17:49:09 +0800 Subject: [PATCH 2/3] feat: --- {src/Android => Android}/.gitignore | 0 {src/Android => Android}/build.gradle | 0 {src/Android => Android}/gradle.properties | 0 .../gradle/wrapper/gradle-wrapper.jar | Bin .../gradle/wrapper/gradle-wrapper.properties | 0 {src/Android => Android}/gradlew | 0 {src/Android => Android}/gradlew.bat | 0 {src/Android => Android}/proguard-rules.pro | 0 .../src/main/AndroidManifest.xml | 0 .../GaiaMotionCurveAccelerateInterpolator.java | 0 .../GaiaMotionCurveAnticipateInterpolator.java | 0 .../GaiaMotionCurveBounceInterpolator.java | 0 .../GaiaMotionCurveCosineInterpolator.java | 0 .../GaiaMotionCurveCubicBezierInterpolator.java | 0 .../GaiaMotionCurveDecelerateInterpolator.java | 0 .../GaiaMotionCurveLinearInterpolator.java | 0 .../GaiaMotionCurveOvershootInterpolator.java | 0 .../GaiaMotionCurveSpringInterpolator.java | 0 .../GaiaMotionCurveStandardInterpolator.java | 0 .../src/main/res/values/strings.xml | 0 {src/iOS => iOS}/GaiaMotionCurve.podspec | 0 .../GaiaMotionCurve.xcodeproj/project.pbxproj | 0 .../GaiaMotionCurve/CALayer+GaiaMotionCurve.h | 0 .../GaiaMotionCurve/CALayer+GaiaMotionCurve.m | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCDefines.h | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCFunctions.h | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCFunctions.m | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCHelper.h | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCHelper.m | 0 .../iOS => iOS}/GaiaMotionCurve/GMCModel+Internal.h | 0 .../iOS => iOS}/GaiaMotionCurve/GMCModel+Internal.m | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCModel.h | 0 {src/iOS => iOS}/GaiaMotionCurve/GMCModel.m | 0 {src/iOS => iOS}/GaiaMotionCurve/GaiaMotionCurve.h | 0 .../GaiaMotionCurve/NSValue+GMCCGFloat.h | 0 .../GaiaMotionCurve/NSValue+GMCCGFloat.m | 0 .../GaiaMotionCurve/NSValue+GMCUIColor.h | 0 .../GaiaMotionCurve/NSValue+GMCUIColor.m | 0 .../GaiaMotionCurveTests/GaiaMotionCurveTests.m | 0 {src/iOS => iOS}/Podfile | 0 40 files changed, 0 insertions(+), 0 deletions(-) rename {src/Android => Android}/.gitignore (100%) rename {src/Android => Android}/build.gradle (100%) rename {src/Android => Android}/gradle.properties (100%) rename {src/Android => Android}/gradle/wrapper/gradle-wrapper.jar (100%) rename {src/Android => Android}/gradle/wrapper/gradle-wrapper.properties (100%) rename {src/Android => Android}/gradlew (100%) rename {src/Android => Android}/gradlew.bat (100%) rename {src/Android => Android}/proguard-rules.pro (100%) rename {src/Android => Android}/src/main/AndroidManifest.xml (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAccelerateInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveAnticipateInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveBounceInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCosineInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveCubicBezierInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveDecelerateInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveLinearInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveOvershootInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveSpringInterpolator.java (100%) rename {src/Android => Android}/src/main/java/com/gaia/MotionCurve/GaiaMotionCurveStandardInterpolator.java (100%) rename {src/Android => Android}/src/main/res/values/strings.xml (100%) rename {src/iOS => iOS}/GaiaMotionCurve.podspec (100%) rename {src/iOS => iOS}/GaiaMotionCurve.xcodeproj/project.pbxproj (100%) rename {src/iOS => iOS}/GaiaMotionCurve/CALayer+GaiaMotionCurve.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/CALayer+GaiaMotionCurve.m (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCDefines.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCFunctions.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCFunctions.m (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCHelper.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCHelper.m (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCModel+Internal.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCModel+Internal.m (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCModel.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GMCModel.m (100%) rename {src/iOS => iOS}/GaiaMotionCurve/GaiaMotionCurve.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/NSValue+GMCCGFloat.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/NSValue+GMCCGFloat.m (100%) rename {src/iOS => iOS}/GaiaMotionCurve/NSValue+GMCUIColor.h (100%) rename {src/iOS => iOS}/GaiaMotionCurve/NSValue+GMCUIColor.m (100%) rename {src/iOS => iOS}/GaiaMotionCurveTests/GaiaMotionCurveTests.m (100%) rename {src/iOS => iOS}/Podfile (100%) diff --git a/src/Android/.gitignore b/Android/.gitignore similarity index 100% rename from src/Android/.gitignore rename to Android/.gitignore diff --git a/src/Android/build.gradle b/Android/build.gradle similarity index 100% rename from src/Android/build.gradle rename to Android/build.gradle 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 100% rename from src/iOS/GaiaMotionCurve.podspec rename to iOS/GaiaMotionCurve.podspec 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 From 187b976f01f5f3a671bc79d84dee2f1129fe47fa Mon Sep 17 00:00:00 2001 From: biezhihua Date: Fri, 11 Mar 2022 18:31:28 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4POD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/GaiaMotionCurve.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/GaiaMotionCurve.podspec b/iOS/GaiaMotionCurve.podspec index ebea566..00f9497 100644 --- a/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