migrated git connected cocoapods test to new test dsl (junit 5 and gradle test kit)
#KT-51553 In Progress
This commit is contained in:
committed by
Space Team
parent
35b475f9f7
commit
267068546f
@@ -2978,18 +2978,36 @@
|
||||
<sha256 value="b802721bac8455a0cb9e0cea76500e34804c354b9354d28e6684a1762b03845e" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-client-jetty-jvm" version="2.0.2">
|
||||
<artifact name="ktor-client-jetty-jvm-2.0.2.jar">
|
||||
<md5 value="15bd4d0e741dd1ae002e0d8739912875" origin="Generated by Gradle"/>
|
||||
<sha256 value="341684d21dad5dd3ccfd1dcd0dff3993e8ee29a54727332a6662e63645619442" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-client-mock" version="1.6.7">
|
||||
<artifact name="ktor-client-mock-metadata-1.6.7-all.jar">
|
||||
<md5 value="df1fe3baed0e593c2f5e86e612da7548" origin="Generated by Gradle"/>
|
||||
<sha256 value="7184531345a37533155b740fefa664eedcc6e4f531e07339c974ec5158542198" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-client-mock" version="2.0.2">
|
||||
<artifact name="ktor-client-mock-metadata-2.0.2-all.jar">
|
||||
<md5 value="16d5d212b947c07874d023c64a735469" origin="Generated by Gradle"/>
|
||||
<sha256 value="8829dbc5f4399b8da7464d7aa81a68fc1d8a26f2587aefcd546b4e23f429e34e" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-client-mock-jvm" version="1.6.7">
|
||||
<artifact name="ktor-client-mock-jvm-1.6.7.jar">
|
||||
<md5 value="51299d395fe8ce886df9983170d2c743" origin="Generated by Gradle"/>
|
||||
<sha256 value="18a1f03278658ebffc43210ccfc315ef98651a68a2b7cc893dbbcdd322163e3b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-client-mock-jvm" version="2.0.2">
|
||||
<artifact name="ktor-client-mock-jvm-2.0.2.jar">
|
||||
<md5 value="ae151cc52c5b31cf8f5417774e4369d0" origin="Generated by Gradle"/>
|
||||
<sha256 value="5cf8b4aa7c134c9a57b18577d012a518eafd22f3a4b5bd7c459be529141e2dd9" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-client-tests" version="1.1.5">
|
||||
<artifact name="ktor-client-tests-1.1.5.jar">
|
||||
<md5 value="6dbbe50ec9982462b38fcf0bbca9e5c1" origin="Generated by Gradle"/>
|
||||
@@ -3330,6 +3348,12 @@
|
||||
<sha256 value="ab5ca967a397b985400a53d2e449027b99039a026db8c1077f386b9ed0ce7c03" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-network-tls-certificates-jvm" version="2.0.2">
|
||||
<artifact name="ktor-network-tls-certificates-jvm-2.0.2.jar">
|
||||
<md5 value="c4f0d65b77edd763ecda8e3e965d1b25" origin="Generated by Gradle"/>
|
||||
<sha256 value="cf75684a7facb1e1964c4bb1146962cb54eef30dbcec08894bf317936d0acca4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-network-tls-jvm" version="1.4.0">
|
||||
<artifact name="ktor-network-tls-jvm-1.4.0.jar">
|
||||
<md5 value="5cc593348b2d3b14afcdcb3a7cc54324" origin="Generated by Gradle"/>
|
||||
@@ -3372,12 +3396,30 @@
|
||||
<sha256 value="43fd805c4586f3830587a608fca28f79291e63c37751be467df95fe67cc640f6" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-call-logging-jvm" version="2.0.2">
|
||||
<artifact name="ktor-server-call-logging-jvm-2.0.2.jar">
|
||||
<md5 value="75fc5458339dd129315eecad3222330e" origin="Generated by Gradle"/>
|
||||
<sha256 value="3bc14609f34571573ff3cd3a3a0cf3c7156f247d68736ca3146a2da38dbf7af4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-core" version="1.6.7">
|
||||
<artifact name="ktor-server-core-jvm-1.6.7.jar">
|
||||
<md5 value="37d6440181540fce0bcf1595bee266e3" origin="Generated by Gradle"/>
|
||||
<sha256 value="b763c1a76df394b64fc412a759f2b5ed6b921b8e8af9ab583d77f44c2ee7c33c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-core" version="2.0.2">
|
||||
<artifact name="ktor-server-core-metadata-2.0.2-all.jar">
|
||||
<md5 value="5b8d41d7a84e13854c2ef252383a0d2c" origin="Generated by Gradle"/>
|
||||
<sha256 value="7cd63e2fa54741c86f4a8c5b464fafa2f75231fbc0167b58e319c124d5ee16fa" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-core-jvm" version="2.0.2">
|
||||
<artifact name="ktor-server-core-jvm-2.0.2.jar">
|
||||
<md5 value="24d0ba936754e36d9c84c23886d58991" origin="Generated by Gradle"/>
|
||||
<sha256 value="d01c9057d3a6646b05a6f0493af0fffe39121b3c15fcd9eff3fe4f39d44957e6" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-host-common" version="1.1.5">
|
||||
<artifact name="ktor-server-host-common-1.1.5.jar">
|
||||
<md5 value="f0fd2447bb1084b6e8e2204077c18a48" origin="Generated by Gradle"/>
|
||||
@@ -3390,6 +3432,18 @@
|
||||
<sha256 value="b38101fb04776a132de15492ae70d2d4d9967a25ea9dba8d5a56a6db9a78a1e2" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-host-common" version="2.0.2">
|
||||
<artifact name="ktor-server-host-common-metadata-2.0.2-all.jar">
|
||||
<md5 value="218e6fa0a47ee07a3ab4cb6feb9d7de2" origin="Generated by Gradle"/>
|
||||
<sha256 value="b969aa6e5bc0e74c4aa02daad7dfc56d84f247881582abc0e00e4ca533e267d9" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-host-common-jvm" version="2.0.2">
|
||||
<artifact name="ktor-server-host-common-jvm-2.0.2.jar">
|
||||
<md5 value="9802b52fe9630881a51fd1b5c8f87e78" origin="Generated by Gradle"/>
|
||||
<sha256 value="e3248e6af8cd2a930b86edcee1d8e92e834e57e42629c1645e2080d7025aaee4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-host-common-kotlinMultiplatform" version="1.6.7">
|
||||
<artifact name="ktor-server-host-common-metadata-1.6.7-all.jar">
|
||||
<md5 value="90aef21cda6f049ffa1eb5468c80fcf1" origin="Generated by Gradle"/>
|
||||
@@ -3408,6 +3462,18 @@
|
||||
<sha256 value="ef338fc40f3f505f328d9151f8a324099b6ead7fb3ec62fd221c905d5bad77d3" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-netty" version="2.0.2">
|
||||
<artifact name="ktor-server-netty-metadata-2.0.2-all.jar">
|
||||
<md5 value="5b9ec305e957d6ea3d0e83eebf2ac79c" origin="Generated by Gradle"/>
|
||||
<sha256 value="4b4086e51cf96942fed07ffbc70c82d397eda9484d04e585fbdbb23c2105ce19" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-netty-jvm" version="2.0.2">
|
||||
<artifact name="ktor-server-netty-jvm-2.0.2.jar">
|
||||
<md5 value="3da576840df3638daa98ca1b05ba573e" origin="Generated by Gradle"/>
|
||||
<sha256 value="786ba683a2f37bf37a9a8c8b5254eb094b084a6fdc31e46ee5a2c68e099248d7" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-servlet" version="1.1.5">
|
||||
<artifact name="ktor-server-servlet-1.1.5.jar">
|
||||
<md5 value="22bc16963d2d52fb1cf1c59fe53b840f" origin="Generated by Gradle"/>
|
||||
@@ -3420,6 +3486,36 @@
|
||||
<sha256 value="8604e2107b265e8045862269690fbd06c3cfdec6aee726270c85261db31f6793" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-test-host" version="2.0.2">
|
||||
<artifact name="ktor-server-test-host-metadata-2.0.2-all.jar">
|
||||
<md5 value="25c075a0db7be50541b9d1f76f31732f" origin="Generated by Gradle"/>
|
||||
<sha256 value="011bb5b2192b526843f335970738a5a7b9dab6ec1072d168192d31eb6c1c87c0" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-test-host-jvm" version="2.0.2">
|
||||
<artifact name="ktor-server-test-host-jvm-2.0.2.jar">
|
||||
<md5 value="7562e37afb5c85698a0fbbe5e3b2fe1c" origin="Generated by Gradle"/>
|
||||
<sha256 value="069e3da1042174e389c4761a610d0686674ed3d58362fb87253605a7fa3ed408" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-server-websockets-jvm" version="2.0.2">
|
||||
<artifact name="ktor-server-websockets-jvm-2.0.2.jar">
|
||||
<md5 value="61332ae70adefc049aee5a404c93bf04" origin="Generated by Gradle"/>
|
||||
<sha256 value="3c1c78232d0335898398884435a77303b853c63a4e3e4566443dbf9227fa9f07" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-test-dispatcher" version="2.0.2">
|
||||
<artifact name="ktor-test-dispatcher-metadata-2.0.2-all.jar">
|
||||
<md5 value="075924a8201a1008c55ae87a8841da4f" origin="Generated by Gradle"/>
|
||||
<sha256 value="9ad483bcfe04638dff71d58f3236b6a488653d58ad3f58e22ab5684299d4a5b4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-test-dispatcher-jvm" version="2.0.2">
|
||||
<artifact name="ktor-test-dispatcher-jvm-2.0.2.jar">
|
||||
<md5 value="49fcfe25151208edac55cf90a89e7505" origin="Generated by Gradle"/>
|
||||
<sha256 value="d3e786759e83615443b6949e75da18d62de3fe78d91ffbed2fd339094b850f2b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.ktor" name="ktor-utils" version="1.0.1">
|
||||
<artifact name="ktor-utils-1.0.1.jar">
|
||||
<md5 value="12a0242c03845afc6f6f05b0b7e6f7d5" origin="Generated by Gradle"/>
|
||||
@@ -3574,6 +3670,12 @@
|
||||
<sha256 value="568ff7cd9d8e2284ec980730c88924f686642929f8f219a74518b4e64755f3a1" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-buffer" version="4.1.77.Final">
|
||||
<artifact name="netty-buffer-4.1.77.Final.jar">
|
||||
<md5 value="e4d870093f5464a55ec314b909ef9c03" origin="Generated by Gradle"/>
|
||||
<sha256 value="41b7ddc4dd124c7e75af33a13a426fda4e1ec87c387cd234971e7df4c0b51c26" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec" version="4.1.34.Final">
|
||||
<artifact name="netty-codec-4.1.34.Final.jar">
|
||||
<md5 value="9a3da08d20c00621aa87e43e5a214b56" origin="Generated by Gradle"/>
|
||||
@@ -3598,6 +3700,12 @@
|
||||
<sha256 value="5d8591ca271a1e9c224e8de3873aa9936acb581ee0db514e7dc18523df36d16c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec" version="4.1.77.Final">
|
||||
<artifact name="netty-codec-4.1.77.Final.jar">
|
||||
<md5 value="7df4d0e74385504a639ed8c9ffbf8336" origin="Generated by Gradle"/>
|
||||
<sha256 value="84e4e01dd5b345311e971289b5bc08c0dfd6054a28d16853f0416943c9a3e458" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec-http" version="4.1.34.Final">
|
||||
<artifact name="netty-codec-http-4.1.34.Final.jar">
|
||||
<md5 value="0c9a870401b6bd60bb132b03c4cbdc26" origin="Generated by Gradle"/>
|
||||
@@ -3622,6 +3730,12 @@
|
||||
<sha256 value="fa6fec88010bfaf6a7415b5364671b6b18ffb6b35a986ab97b423fd8c3a0174b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec-http" version="4.1.77.Final">
|
||||
<artifact name="netty-codec-http-4.1.77.Final.jar">
|
||||
<md5 value="1a0e4e1e33d2dc29006649da84dac2d2" origin="Generated by Gradle"/>
|
||||
<sha256 value="96f6726f1f47273415665e8bf18f3b4ae28572fcb8845a7fe6e6d7ffdb8c48d2" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec-http2" version="4.1.34.Final">
|
||||
<artifact name="netty-codec-http2-4.1.34.Final.jar">
|
||||
<md5 value="5f5d7876b5a1efbcb64267f98b8de8dd" origin="Generated by Gradle"/>
|
||||
@@ -3646,6 +3760,12 @@
|
||||
<sha256 value="c89a70500f59e8563e720aaa808263a514bd9e2bd91ba84eab8c2ccb45f234b2" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec-http2" version="4.1.77.Final">
|
||||
<artifact name="netty-codec-http2-4.1.77.Final.jar">
|
||||
<md5 value="3f14bfaa4282ad08ccfcf89858d94dad" origin="Generated by Gradle"/>
|
||||
<sha256 value="f2c3c1dc919fd694d1c4015143316811ed3c70edc6b0586851190305c2723296" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-codec-socks" version="4.1.34.Final">
|
||||
<artifact name="netty-codec-socks-4.1.34.Final.jar">
|
||||
<md5 value="4216f7c46ca07ae3aae7ed49a0017d02" origin="Generated by Gradle"/>
|
||||
@@ -3682,6 +3802,12 @@
|
||||
<sha256 value="8adb4c291260ceb2859a68c49f0adeed36bf49587608e2b81ecff6aaf06025e9" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-common" version="4.1.77.Final">
|
||||
<artifact name="netty-common-4.1.77.Final.jar">
|
||||
<md5 value="c0fe65266d70074e8a82e48db581a848" origin="Generated by Gradle"/>
|
||||
<sha256 value="40dd9b5ef14878f050a1f7f4d5647d53473f134e349665b47243bde56de7a51f" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-handler" version="4.1.34.Final">
|
||||
<artifact name="netty-handler-4.1.34.Final.jar">
|
||||
<md5 value="21ef74035b5a174d7851760fe0546d06" origin="Generated by Gradle"/>
|
||||
@@ -3706,6 +3832,12 @@
|
||||
<sha256 value="9cb6012af7e06361d738ac4e3bdc49a158f8cf87d9dee0f2744056b7d99c28d5" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-handler" version="4.1.77.Final">
|
||||
<artifact name="netty-handler-4.1.77.Final.jar">
|
||||
<md5 value="a11c1ffacef7002473eff817f4907041" origin="Generated by Gradle"/>
|
||||
<sha256 value="7911becd4850ff3fc3d93b4be7c468a2f6444fb48c17eec03c807856faf11e0a" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-handler-proxy" version="4.1.34.Final">
|
||||
<artifact name="netty-handler-proxy-4.1.34.Final.jar">
|
||||
<md5 value="56c00df38ef44fbe942180bc2db23e7a" origin="Generated by Gradle"/>
|
||||
@@ -3736,6 +3868,12 @@
|
||||
<sha256 value="6474598aab7cc9d8d6cfa06c05bd1b19adbf7f8451dbdd73070b33a6c60b1b90" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-resolver" version="4.1.77.Final">
|
||||
<artifact name="netty-resolver-4.1.77.Final.jar">
|
||||
<md5 value="ed36d0e6f0696b6d676387b499a0f403" origin="Generated by Gradle"/>
|
||||
<sha256 value="0161cfe9544b3656ed0de67d8937828101859e94bcd0caaf58d21ac7011eabd4" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport" version="4.1.34.Final">
|
||||
<artifact name="netty-transport-4.1.34.Final.jar">
|
||||
<md5 value="a41e7c79bf7fc4168b30ecd68cc9d3a1" origin="Generated by Gradle"/>
|
||||
@@ -3760,24 +3898,60 @@
|
||||
<sha256 value="c5fb68e9a65b6e8a516adfcb9fa323479ee7b4d9449d8a529d2ecab3d3711d5a" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport" version="4.1.77.Final">
|
||||
<artifact name="netty-transport-4.1.77.Final.jar">
|
||||
<md5 value="fbecfcb90b7e178dfd0795d3a4b24b54" origin="Generated by Gradle"/>
|
||||
<sha256 value="034cdf7d81feaad9977c3d8b4fc05611952bc9861dfb9085b8962e2c1de582aa" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-classes-epoll" version="4.1.77.Final">
|
||||
<artifact name="netty-transport-classes-epoll-4.1.77.Final.jar">
|
||||
<md5 value="bd1f350efa67b42a61a6e0ee36dfce5e" origin="Generated by Gradle"/>
|
||||
<sha256 value="0593fb942d7d57aadcc22360a238dcfac9f29013a20201ef49cc392b0dd2aaf9" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-classes-kqueue" version="4.1.77.Final">
|
||||
<artifact name="netty-transport-classes-kqueue-4.1.77.Final.jar">
|
||||
<md5 value="f1f7fb0f2d1a2cd3e1cef4ecaa8d0813" origin="Generated by Gradle"/>
|
||||
<sha256 value="4f27439bd83ae147b327dc0fdb9ff7315e93927b4054afe6ce8e64b0d78c85f5" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-native-epoll" version="4.1.69.Final">
|
||||
<artifact name="netty-transport-native-epoll-4.1.69.Final.jar">
|
||||
<md5 value="3fd71e6f4e93c8d470048117a3698289" origin="Generated by Gradle"/>
|
||||
<sha256 value="ac53b5358c7583ec18a0e455f24a528841e250771e921c147221be3d5b50a34c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-native-epoll" version="4.1.77.Final">
|
||||
<artifact name="netty-transport-native-epoll-4.1.77.Final.jar">
|
||||
<md5 value="4c6d645de19b7c2eac69e598fb270f08" origin="Generated by Gradle"/>
|
||||
<sha256 value="ce87b3400ce5a869494007b67c1f2a4af4fe90c48e6ce7dd441cff01f5fa4015" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-native-kqueue" version="4.1.69.Final">
|
||||
<artifact name="netty-transport-native-kqueue-4.1.69.Final.jar">
|
||||
<md5 value="39657af1fd35379ab52ed5294447e50a" origin="Generated by Gradle"/>
|
||||
<sha256 value="aa034b96b099ca9ed1b67f18dc29fb40591e648e594caa3c44b928206561357d" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-native-kqueue" version="4.1.77.Final">
|
||||
<artifact name="netty-transport-native-kqueue-4.1.77.Final.jar">
|
||||
<md5 value="5557fb5ca5e2503c1c14205a6add4f1c" origin="Generated by Gradle"/>
|
||||
<sha256 value="e8a200301c087dd9278fb598d19e27d549d652cf9a38f8ad6a8167a35a51bdd6" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-native-unix-common" version="4.1.69.Final">
|
||||
<artifact name="netty-transport-native-unix-common-4.1.69.Final.jar">
|
||||
<md5 value="06de0a2b0339b1c5b65b741cdfee32c2" origin="Generated by Gradle"/>
|
||||
<sha256 value="fd1f61213fa635883b69def4dd3c4629917bf7af4d9953ae805273a9a17662c2" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.netty" name="netty-transport-native-unix-common" version="4.1.77.Final">
|
||||
<artifact name="netty-transport-native-unix-common-4.1.77.Final.jar">
|
||||
<md5 value="ef57aa3b1ac55fafddab78aa2f4df581" origin="Generated by Gradle"/>
|
||||
<sha256 value="108d27f325fa9ce9a914fa53638fbeeb1a384148fb3a13389bd09a5e38e4ac1e" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="io.opencensus" name="opencensus-api" version="0.21.0">
|
||||
<artifact name="opencensus-api-0.21.0.jar">
|
||||
<md5 value="450bfd9766b9c76af55c46447b5b94a0" origin="Generated by Gradle"/>
|
||||
@@ -3979,12 +4153,24 @@
|
||||
<sha256 value="5557e235a8aa2f9766d5dc609d67948f2a8832c2d796cea9ef1d6cbe0b3b7eaf" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="net.java.dev.jna" name="jna" version="5.9.0">
|
||||
<artifact name="jna-5.9.0.jar">
|
||||
<md5 value="bd7ccbc4f374a791fbfc8b79c2de1e72" origin="Generated by Gradle"/>
|
||||
<sha256 value="eafcc780b445434d3c5ae7fa2fb6665de1a7560d537d2c408a8e80cd14d27161" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="net.java.dev.jna" name="jna-platform" version="5.6.0">
|
||||
<artifact name="jna-platform-5.6.0.jar">
|
||||
<md5 value="3c345206c4f2243e5d1d7caceb9243cd" origin="Generated by Gradle"/>
|
||||
<sha256 value="9ecea8bf2b1b39963939d18b70464eef60c508fed8820f9dcaba0c35518eabf7" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="net.java.dev.jna" name="jna-platform" version="5.9.0">
|
||||
<artifact name="jna-platform-5.9.0.jar">
|
||||
<md5 value="6c285485f0fcdb7821c3a06aafb0e665" origin="Generated by Gradle"/>
|
||||
<sha256 value="1903bc6d87f3ab92023957b91f45a9c8eb3515bad030356ce977201e5141b724" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="net.rubygrapefruit" name="native-platform" version="0.14">
|
||||
<artifact name="native-platform-0.14.jar">
|
||||
<md5 value="7d91f346c7ff91162d66f0e2428d49f6" origin="Generated by Gradle"/>
|
||||
@@ -6415,12 +6601,24 @@
|
||||
<sha256 value="eed66ecd368d8c780d095fddf292638ae08a07bcbf6d9e88bea56566f61d4f86" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-alpn-client" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-alpn-client-9.4.45.v20220203.jar">
|
||||
<md5 value="4996183264330b4788ec93c345a411b5" origin="Generated by Gradle"/>
|
||||
<sha256 value="d324929e294f9e51be245ee32b063b0d1351aaf0b06952fe2117df3b95076b60" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-alpn-java-client" version="9.4.11.v20180605">
|
||||
<artifact name="jetty-alpn-java-client-9.4.11.v20180605.jar">
|
||||
<md5 value="bbb03612eb6915fc89bf48800ebda8a9" origin="Generated by Gradle"/>
|
||||
<sha256 value="cb610137cb082c10d17825afafd28ae4d3a7c94e375ac4e50988e99d47b4238d" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-alpn-java-client" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-alpn-java-client-9.4.45.v20220203.jar">
|
||||
<md5 value="1c503233de911f15bf20bfdf23147758" origin="Generated by Gradle"/>
|
||||
<sha256 value="d385afc4201fc6eeba5bd8c101302ed9373a225b2ae7523aafe3ee83c4bbf05b" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-alpn-java-server" version="9.4.11.v20180605">
|
||||
<artifact name="jetty-alpn-java-server-9.4.11.v20180605.jar">
|
||||
<md5 value="6f5d181045c05844faeba1daaf286af3" origin="Generated by Gradle"/>
|
||||
@@ -6433,6 +6631,12 @@
|
||||
<sha256 value="83dd3287fc816a150c6c1cb2bc48229ace56e920ef7e5e062d1c64c8eb8d7ca9" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-alpn-openjdk8-client" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-alpn-openjdk8-client-9.4.45.v20220203.jar">
|
||||
<md5 value="8c5eb66ee4668057e9886543f8a17a3a" origin="Generated by Gradle"/>
|
||||
<sha256 value="a0bb35557388f851e399fbf6ebc4ede69c5c78fa9b3161da2dac8f02e2769346" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-alpn-openjdk8-server" version="9.4.11.v20180605">
|
||||
<artifact name="jetty-alpn-openjdk8-server-9.4.11.v20180605.jar">
|
||||
<md5 value="9a03e946fff9a1cdb8941bd5a9fd75ce" origin="Generated by Gradle"/>
|
||||
@@ -6451,6 +6655,12 @@
|
||||
<sha256 value="b096ea6ee2607886323791930a470b2e04fb3327459b287ef99647226bd7a09c" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-client" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-client-9.4.45.v20220203.jar">
|
||||
<md5 value="6517e3b71ee8a651de963287a5266d24" origin="Generated by Gradle"/>
|
||||
<sha256 value="36b3399466ebd7abd35a7865cecca02a1b977e1a18111b92bb8ad9920f83ac39" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-continuation" version="9.4.11.v20180605">
|
||||
<artifact name="jetty-continuation-9.4.11.v20180605.jar">
|
||||
<md5 value="9a5a3808342e1e296d96d52ce2503f15" origin="Generated by Gradle"/>
|
||||
@@ -6463,12 +6673,24 @@
|
||||
<sha256 value="963b75730aa92b0dfbe65fe8a2e413edc88aeb53e8686ba6b1617d7caeb14067" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-http" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-http-9.4.45.v20220203.jar">
|
||||
<md5 value="f6900f470ec0f562430ff2a968b9e127" origin="Generated by Gradle"/>
|
||||
<sha256 value="80ab020894b9e03aaadf22386b8a6218feb88eba7946ae2dad1a1a2300c92c09" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-io" version="9.4.11.v20180605">
|
||||
<artifact name="jetty-io-9.4.11.v20180605.jar">
|
||||
<md5 value="8d857135fdf97ade2fcf75fe3b9b7372" origin="Generated by Gradle"/>
|
||||
<sha256 value="75c82d6e542a3518e2517c4084c83d8216ec2d2458f8747b8b5c944355ebd732" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-io" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-io-9.4.45.v20220203.jar">
|
||||
<md5 value="7de6ca36f010063f91a539e9313bea14" origin="Generated by Gradle"/>
|
||||
<sha256 value="a5ea4b3743c81567a32eedc25b14ece7cfa791a17190b691f406011183b891a2" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-server" version="9.4.11.v20180605">
|
||||
<artifact name="jetty-server-9.4.11.v20180605.jar">
|
||||
<md5 value="c743bce25d9ad2ff5f8409ed7adb9243" origin="Generated by Gradle"/>
|
||||
@@ -6487,6 +6709,12 @@
|
||||
<sha256 value="936e5ed74275c16164cc1eccaeae55900eb00edd9f1b1d3b83d70782dd25f505" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty" name="jetty-util" version="9.4.45.v20220203">
|
||||
<artifact name="jetty-util-9.4.45.v20220203.jar">
|
||||
<md5 value="7265c75f8c8a582ff0fb4c3325a6a09d" origin="Generated by Gradle"/>
|
||||
<sha256 value="344157d915685b4a4eeab107a2826f61043f5e9fef68b575ddff7aea9b44c23a" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.alpn" name="alpn-api" version="1.1.3.v20160715">
|
||||
<artifact name="alpn-api-1.1.3.v20160715.jar">
|
||||
<md5 value="18383950cc83169b8ed61c03fd926e0c" origin="Generated by Gradle"/>
|
||||
@@ -6499,24 +6727,48 @@
|
||||
<sha256 value="29caeb5ddce1751e5bffbf59899931d239d8c734539d1427888fd831d01d03a9" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-client" version="9.4.45.v20220203">
|
||||
<artifact name="http2-client-9.4.45.v20220203.jar">
|
||||
<md5 value="137985e1ea9ce3cf18331829d8f6c116" origin="Generated by Gradle"/>
|
||||
<sha256 value="34152e0a6a279b1f8347801e359a66863e544560bece72bebe262e476671aa98" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-common" version="9.4.11.v20180605">
|
||||
<artifact name="http2-common-9.4.11.v20180605.jar">
|
||||
<md5 value="b81903d62747038f33c757fbbf59f58c" origin="Generated by Gradle"/>
|
||||
<sha256 value="2bb9e850d3dd3c5edf074c8e39608eaba9128403f51006ba8f10e76db4045eda" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-common" version="9.4.45.v20220203">
|
||||
<artifact name="http2-common-9.4.45.v20220203.jar">
|
||||
<md5 value="9ac4c28299c2250eaa30e78d1f86c813" origin="Generated by Gradle"/>
|
||||
<sha256 value="455bafcd0c22aac2cbbf5187a4a386ebda92f1c72b23d6eb68c49f6565cf0362" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-hpack" version="9.4.11.v20180605">
|
||||
<artifact name="http2-hpack-9.4.11.v20180605.jar">
|
||||
<md5 value="768377bac9c913bf57abc329d90b0134" origin="Generated by Gradle"/>
|
||||
<sha256 value="2199d15d5423366db482f04a3a5074e2f1f89db726174217fccb34fd2a3c02b5" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-hpack" version="9.4.45.v20220203">
|
||||
<artifact name="http2-hpack-9.4.45.v20220203.jar">
|
||||
<md5 value="cfe88af501d3552ac194bd3a2c4997e4" origin="Generated by Gradle"/>
|
||||
<sha256 value="955cf1239779bce0cf63f1b874cde894a5506df62f541747f922016455a636bc" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-http-client-transport" version="9.4.11.v20180605">
|
||||
<artifact name="http2-http-client-transport-9.4.11.v20180605.jar">
|
||||
<md5 value="3527bc6eadfa76cfd492c343fdf7d098" origin="Generated by Gradle"/>
|
||||
<sha256 value="84304567329d7fb9128112cf4757de42a10dbcc059d90b813a6d33f87253bfc7" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-http-client-transport" version="9.4.45.v20220203">
|
||||
<artifact name="http2-http-client-transport-9.4.45.v20220203.jar">
|
||||
<md5 value="e5398b66fcb79b0727e7cf4d2904edff" origin="Generated by Gradle"/>
|
||||
<sha256 value="677149cc8c4514796dbbd9926b85c94ecc3e3f18dd6f7794541e371c6dba434d" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.eclipse.jetty.http2" name="http2-server" version="9.4.11.v20180605">
|
||||
<artifact name="http2-server-9.4.11.v20180605.jar">
|
||||
<md5 value="f1a6f413f2adab7036e0d62fb769b336" origin="Generated by Gradle"/>
|
||||
@@ -7065,6 +7317,12 @@
|
||||
<sha256 value="3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.jetbrains.kotlin" name="kotlin-reflect" version="1.6.21">
|
||||
<artifact name="kotlin-reflect-1.6.21.jar">
|
||||
<md5 value="3db09afc9595efdfa2eccba08665501b" origin="Generated by Gradle"/>
|
||||
<sha256 value="1e1f57209f7238c3fd1735a1b9339a56565507dca249f8371bf59d91f601aeaa" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.jetbrains.kotlin" name="kotlin-reflect" version="1.7.0">
|
||||
<artifact name="kotlin-reflect-1.7.0.jar">
|
||||
<md5 value="39d59ba6bd41a7fcf1490275ed0a7678" origin="Generated by Gradle"/>
|
||||
@@ -7939,6 +8197,12 @@
|
||||
<sha256 value="9c615416dadd93f0e14895165af8eeee01a1aaaafe02c3eb1f2d2a770b595069" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.jetbrains.kotlinx" name="kotlinx-coroutines-debug" version="1.6.1">
|
||||
<artifact name="kotlinx-coroutines-debug-1.6.1.jar">
|
||||
<md5 value="8221e2003b97c9a9cf1d405a5d55844a" origin="Generated by Gradle"/>
|
||||
<sha256 value="9c1d07b9788ac42d0ed4b2d2fab7dd56117c488de46833cc794dbe774b89fbaa" origin="Generated by Gradle"/>
|
||||
</artifact>
|
||||
</component>
|
||||
<component group="org.jetbrains.kotlinx" name="kotlinx-coroutines-io" version="0.1.1">
|
||||
<artifact name="kotlinx-coroutines-io-0.1.1.jar">
|
||||
<md5 value="9bbd267f89d7f6187da5a58d685e90aa" origin="Generated by Gradle"/>
|
||||
|
||||
@@ -48,12 +48,12 @@ versions.kotlinx-coroutines-core=1.5.0
|
||||
versions.kotlinx-metadata-jvm=0.6.0
|
||||
versions.kotlinx-metadata-klib=0.0.1-dev-10
|
||||
versions.kotlinx-serialization-json=1.3.3
|
||||
versions.ktor-network=1.4.0
|
||||
versions.ktor-utils=1.4.0
|
||||
versions.ktor-server-test-host=1.1.5
|
||||
versions.ktor-server-core=1.6.7
|
||||
versions.ktor-server-netty=1.6.7
|
||||
versions.ktor-client-mock=1.6.7
|
||||
versions.ktor-network=2.0.2
|
||||
versions.ktor-utils=2.0.2
|
||||
versions.ktor-server-test-host=2.0.2
|
||||
versions.ktor-server-core=2.0.2
|
||||
versions.ktor-server-netty=2.0.2
|
||||
versions.ktor-client-mock=2.0.2
|
||||
versions.ktor-client-core=2.0.2
|
||||
versions.ktor-client-cio=2.0.2
|
||||
versions.ktor-client-websockets=2.0.2
|
||||
|
||||
@@ -87,6 +87,7 @@ dependencies {
|
||||
testImplementation(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-test-host"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-core"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-cio"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-server-netty"))
|
||||
testImplementation(commonDependency("io.ktor", "ktor-client-mock"))
|
||||
|
||||
|
||||
+4
-4
@@ -8,13 +8,13 @@ package org.jetbrains.kotlin.gradle
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonObject
|
||||
import com.google.gson.JsonParser
|
||||
import io.ktor.application.*
|
||||
import io.ktor.http.*
|
||||
import io.ktor.request.*
|
||||
import io.ktor.response.*
|
||||
import io.ktor.routing.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.engine.*
|
||||
import io.ktor.server.netty.*
|
||||
import io.ktor.server.request.*
|
||||
import io.ktor.server.response.*
|
||||
import io.ktor.server.routing.*
|
||||
import io.ktor.util.*
|
||||
import io.ktor.util.collections.*
|
||||
import org.gradle.util.GradleVersion
|
||||
|
||||
+3
@@ -9,6 +9,7 @@ import org.gradle.api.JavaVersion
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.condition.OS
|
||||
import kotlin.io.path.absolutePathString
|
||||
@@ -574,6 +575,8 @@ class AppleFrameworkIT : KGPBaseTest() {
|
||||
)
|
||||
}
|
||||
|
||||
subProject("iosApp").buildGradleKts.replaceText("<applePluginTestVersion>", "\"${TestVersions.AppleGradlePlugin.V222_0_21}\"")
|
||||
|
||||
build(*dependencyInsight("iosAppIosX64DebugImplementation")) {
|
||||
assertContainsVariant("mainDynamicDebugFrameworkIos")
|
||||
}
|
||||
|
||||
+509
@@ -0,0 +1,509 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.native
|
||||
|
||||
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.engine.cio.*
|
||||
import io.ktor.client.request.*
|
||||
import io.ktor.http.*
|
||||
import io.ktor.util.*
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.gradle.testkit.runner.BuildResult
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_BUILD_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_GEN_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_IMPORT_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_INSTALL_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_SETUP_BUILD_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_SPEC_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.jetbrains.kotlin.gradle.util.assertProcessRunResult
|
||||
import org.jetbrains.kotlin.gradle.util.capitalize
|
||||
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||
import org.jetbrains.kotlin.gradle.util.runProcess
|
||||
import org.junit.jupiter.api.Assumptions
|
||||
import org.junit.jupiter.api.BeforeAll
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.condition.OS
|
||||
import java.nio.file.Path
|
||||
import java.util.*
|
||||
import kotlin.io.path.absolutePathString
|
||||
import kotlin.io.path.readText
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
@OsCondition(supportedOn = [OS.MAC], enabledOnCI = [OS.MAC])
|
||||
@DisplayName("Git connected K/N tests with cocoapods")
|
||||
@NativeGradlePluginTests
|
||||
@GradleTestVersions(minVersion = TestVersions.Gradle.G_7_0)
|
||||
@OptIn(EnvironmentalVariablesOverride::class)
|
||||
class CocoaPodsGitIT : KGPBaseTest() {
|
||||
|
||||
override val defaultBuildOptions = super.defaultBuildOptions.copy(
|
||||
nativeOptions = super.defaultBuildOptions.nativeOptions.copy(
|
||||
cocoapodsGenerateWrapper = true
|
||||
)
|
||||
)
|
||||
|
||||
private val templateProjectName = "native-cocoapods-template"
|
||||
private val groovyTemplateProjectName = "native-cocoapods-template-groovy"
|
||||
|
||||
private val defaultPodRepo = "https://github.com/AFNetworking/AFNetworking"
|
||||
private val defaultPodName = "AFNetworking"
|
||||
private val defaultTarget = "IOS"
|
||||
private val defaultFamily = "ios"
|
||||
private val defaultSDK = "iphonesimulator"
|
||||
private val cinteropTaskName = ":cinterop"
|
||||
private val defaultCinteropTaskName = cinteropTaskName + defaultPodName + defaultTarget
|
||||
|
||||
private val podImportTaskName = ":$POD_IMPORT_TASK_NAME"
|
||||
private val podspecTaskName = ":$POD_SPEC_TASK_NAME"
|
||||
private val podGenTaskName = ":$POD_GEN_TASK_NAME"
|
||||
private val podSetupBuildTaskName = ":$POD_SETUP_BUILD_TASK_NAME"
|
||||
private val podBuildTaskName = ":$POD_BUILD_TASK_NAME"
|
||||
private val podInstallTaskName = ":$POD_INSTALL_TASK_NAME"
|
||||
|
||||
private val defaultPodInstallSyntheticTaskName = ":podInstallSyntheticIos"
|
||||
private val defaultPodGenTaskName = podGenFullTaskName()
|
||||
private val defaultBuildTaskName = podBuildFullTaskName()
|
||||
private val defaultSetupBuildTaskName = podSetupBuildFullTaskName()
|
||||
|
||||
private fun podGenFullTaskName(familyName: String = defaultFamily) =
|
||||
podGenTaskName + familyName.capitalize()
|
||||
|
||||
private fun podSetupBuildFullTaskName(podName: String = defaultPodName, sdkName: String = defaultSDK) =
|
||||
podSetupBuildTaskName + podName.capitalize() + sdkName.capitalize()
|
||||
|
||||
private fun podBuildFullTaskName(podName: String = defaultPodName, sdkName: String = defaultSDK) =
|
||||
podBuildTaskName + podName.capitalize() + sdkName.capitalize()
|
||||
|
||||
private fun cinteropFullTaskName(podName: String = defaultPodName, targetName: String = defaultTarget) =
|
||||
cinteropTaskName + podName.capitalize() + targetName.capitalize()
|
||||
|
||||
@BeforeAll
|
||||
fun setUp() {
|
||||
ensureCocoapodsInstalled()
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod from git without specifying neither tag not commit")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitNoTagNorCommit(gradleVersion: GradleVersion) {
|
||||
doTestGit(gradleVersion)
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod from git with specifying tag")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitTag(gradleVersion: GradleVersion) {
|
||||
doTestGit(gradleVersion, tag = "4.0.0")
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod from git with specifying commit")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitCommit(gradleVersion: GradleVersion) {
|
||||
doTestGit(gradleVersion, commit = "9c07ac0a5645abb58850253eeb109ed0dca515c1")
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod from git with specifying branch")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitBranch(gradleVersion: GradleVersion) {
|
||||
doTestGit(gradleVersion, branch = "2974")
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod's subspec from git")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitSubspec(gradleVersion: GradleVersion) {
|
||||
doTestGit(
|
||||
gradleVersion,
|
||||
repo = "https://github.com/SDWebImage/SDWebImage.git",
|
||||
pod = "SDWebImage/MapKit",
|
||||
tag = "5.9.2"
|
||||
)
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod from git with specifying branch and commit")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitBranchAndCommit(gradleVersion: GradleVersion) {
|
||||
doTestGit(
|
||||
gradleVersion,
|
||||
branch = "2974",
|
||||
commit = "21637dd6164c0641e414bdaf3885af6f1ef15aee"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@DisplayName("Downloading pod from git (tag priority is bigger than branch priority)")
|
||||
@GradleTest
|
||||
fun testPodDownloadGitBranchAndTag(gradleVersion: GradleVersion) {
|
||||
doTestGit(
|
||||
gradleVersion,
|
||||
tag = "4.0.0",
|
||||
branch = "2974"
|
||||
)
|
||||
}
|
||||
|
||||
@DisplayName("Downloading pod from git with specifying tag for groovy build file")
|
||||
@GradleTest
|
||||
fun testGroovyDownloadAndImport(gradleVersion: GradleVersion) {
|
||||
doTestGit(
|
||||
gradleVersion,
|
||||
groovyTemplateProjectName,
|
||||
tag = "4.0.0",
|
||||
isGradleBuildScript = true
|
||||
)
|
||||
}
|
||||
|
||||
@DisplayName("Checks that task cinterop is up to date during the second build")
|
||||
@GradleTest
|
||||
fun testCinteropUpToDate(gradleVersion: GradleVersion) {
|
||||
doTestGit(gradleVersion) {
|
||||
|
||||
build(
|
||||
"syncFramework",
|
||||
buildOptions = defaultBuildOptions.copy(
|
||||
nativeOptions = defaultBuildOptions.nativeOptions.copy(
|
||||
cocoapodsGenerateWrapper = true,
|
||||
cocoapodsArchs = "x86_64",
|
||||
cocoapodsConfiguration = "Debug",
|
||||
cocoapodsPlatform = "iphonesimulator",
|
||||
)
|
||||
)
|
||||
) {
|
||||
assertTasksUpToDate(
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@DisplayName("UTD test")
|
||||
@GradleTest
|
||||
fun basicUTDTest(gradleVersion: GradleVersion) {
|
||||
val tasks = listOf(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
defaultPodInstallSyntheticTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName,
|
||||
)
|
||||
doTestGit(
|
||||
gradleVersion,
|
||||
testImportAssertions = { assertTasksExecuted(tasks) }
|
||||
) {
|
||||
testImport {
|
||||
assertTasksUpToDate(tasks)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("UTD with adding and removing pod")
|
||||
@GradleTest
|
||||
fun testUTDPodAdded(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
buildGradleKts.addPod(defaultPodName, produceGitBlock())
|
||||
testImport()
|
||||
|
||||
val anotherPodName = "Alamofire"
|
||||
val anotherPodRepo = "https://github.com/Alamofire/Alamofire"
|
||||
buildGradleKts.addPod(anotherPodName, produceGitBlock(anotherPodRepo))
|
||||
testImport(listOf(defaultPodRepo, anotherPodRepo)) {
|
||||
|
||||
assertTasksExecuted(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
podSetupBuildFullTaskName(anotherPodName),
|
||||
podBuildFullTaskName(anotherPodName),
|
||||
cinteropFullTaskName(anotherPodName)
|
||||
)
|
||||
assertTasksUpToDate(
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
|
||||
buildGradleKts.removePod(anotherPodName)
|
||||
|
||||
testImport {
|
||||
assertOutputDoesNotContain(podBuildFullTaskName(anotherPodName))
|
||||
assertOutputDoesNotContain(cinteropFullTaskName(anotherPodName))
|
||||
assertTasksUpToDate(
|
||||
defaultBuildTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("UTD with adding and removing target")
|
||||
@GradleTest
|
||||
fun testUTDTargetAdded(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
buildGradleKts.addPod(defaultPodName, produceGitBlock())
|
||||
|
||||
testImport()
|
||||
|
||||
buildGradleKts.addCocoapodsBlock("osx.deploymentTarget = \"10.15\"")
|
||||
testImport()
|
||||
|
||||
val tasks = listOf(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
val anotherTarget = "MacosX64"
|
||||
val anotherSdk = "macosx"
|
||||
val anotherFamily = "macos"
|
||||
buildGradleKts.addKotlinBlock(anotherTarget.replaceFirstChar { it.lowercase(Locale.getDefault()) } + "()")
|
||||
|
||||
testImport {
|
||||
assertTasksExecuted(
|
||||
podGenFullTaskName(anotherFamily),
|
||||
podSetupBuildFullTaskName(sdkName = anotherSdk),
|
||||
podBuildFullTaskName(sdkName = anotherSdk),
|
||||
cinteropFullTaskName(targetName = anotherTarget)
|
||||
)
|
||||
assertTasksUpToDate(tasks)
|
||||
}
|
||||
|
||||
buildGradleKts.replaceText(anotherTarget.replaceFirstChar { it.lowercase(Locale.getDefault()) } + "()", "")
|
||||
testImport {
|
||||
assertOutputDoesNotContain(podGenFullTaskName(anotherFamily))
|
||||
assertOutputDoesNotContain(podSetupBuildFullTaskName(sdkName = anotherSdk))
|
||||
assertOutputDoesNotContain(podBuildFullTaskName(sdkName = anotherSdk))
|
||||
assertOutputDoesNotContain(cinteropFullTaskName(targetName = anotherTarget))
|
||||
assertTasksUpToDate(tasks)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("UTD build")
|
||||
@GradleTest
|
||||
fun testUTDBuild(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
buildGradleKts.addPod(defaultPodName, produceGitBlock())
|
||||
|
||||
testImport {
|
||||
assertTasksExecuted(defaultBuildTaskName)
|
||||
}
|
||||
|
||||
val anotherTarget = "MacosX64"
|
||||
val anotherSdk = "macosx"
|
||||
val anotherSdkDefaultPodTaskName = podBuildFullTaskName(sdkName = anotherSdk)
|
||||
buildGradleKts.addCocoapodsBlock("osx.deploymentTarget = \"10.15\"")
|
||||
buildGradleKts.addKotlinBlock(anotherTarget.replaceFirstChar { it.lowercase(Locale.getDefault()) } + "()")
|
||||
|
||||
testImport {
|
||||
assertTasksUpToDate(defaultBuildTaskName)
|
||||
assertTasksExecuted(anotherSdkDefaultPodTaskName)
|
||||
}
|
||||
testImport {
|
||||
assertTasksUpToDate(defaultBuildTaskName, anotherSdkDefaultPodTaskName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("Pod Build UTD after clean")
|
||||
@GradleTest
|
||||
fun testPodBuildUTDClean(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
buildGradleKts.addPod(defaultPodName, produceGitBlock())
|
||||
|
||||
testImport {
|
||||
assertTasksExecuted(defaultBuildTaskName)
|
||||
}
|
||||
build(":clean")
|
||||
testImport {
|
||||
assertTasksExecuted(defaultBuildTaskName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("Link with use of dynamic framework ")
|
||||
@GradleTest
|
||||
fun testUseDynamicFramework(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
buildGradleKts.addPod(defaultPodName, produceGitBlock())
|
||||
buildGradleKts.addFrameworkBlock("isStatic = false")
|
||||
|
||||
build("linkPodDebugFrameworkIOS") {
|
||||
val framework = projectPath.resolve("build/bin/iOS/podDebugFramework/cocoapods.framework/cocoapods")
|
||||
val processRunResult = runProcess(
|
||||
listOf("file", framework.absolutePathString()),
|
||||
workingDir = projectPath.toFile(),
|
||||
environmentVariables = environmentVariables.environmentalVariables
|
||||
)
|
||||
assertProcessRunResult(processRunResult) {
|
||||
assertTrue(isSuccessful)
|
||||
assertTrue(output.contains("dynamically linked shared library"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("Link with use of static framework ")
|
||||
@GradleTest
|
||||
fun testUseStaticFramework(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
buildGradleKts.addPod(defaultPodName, produceGitBlock())
|
||||
buildGradleKts.addFrameworkBlock("isStatic = true")
|
||||
|
||||
build("linkPodDebugFrameworkIOS") {
|
||||
val framework = projectPath.resolve("build/bin/iOS/podDebugFramework/cocoapods.framework/cocoapods")
|
||||
val processRunResult = runProcess(
|
||||
listOf("file", framework.absolutePathString()),
|
||||
workingDir = projectPath.toFile(),
|
||||
environmentVariables = environmentVariables.environmentalVariables
|
||||
)
|
||||
assertProcessRunResult(processRunResult) {
|
||||
assertTrue(isSuccessful)
|
||||
assertTrue(output.contains("current ar archive"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@DisplayName("UTD with different spec repo")
|
||||
@GradleTest
|
||||
fun testUTDPodGen(gradleVersion: GradleVersion) {
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(gradleVersion = gradleVersion) {
|
||||
|
||||
buildGradleKts.addPod(defaultPodName)
|
||||
val repos = listOf(
|
||||
"https://github.com/alozhkin/spec_repo_example",
|
||||
"https://github.com/alozhkin/spec_repo_example_2"
|
||||
)
|
||||
|
||||
isRepoAvailable(repos)
|
||||
|
||||
build(defaultPodGenTaskName) {
|
||||
assertTasksExecuted(defaultPodGenTaskName)
|
||||
}
|
||||
|
||||
buildGradleKts.addSpecRepo("https://github.com/alozhkin/spec_repo_example")
|
||||
build(defaultPodGenTaskName) {
|
||||
assertTasksExecuted(defaultPodGenTaskName)
|
||||
}
|
||||
|
||||
buildGradleKts.addSpecRepo("https://github.com/alozhkin/spec_repo_example_2")
|
||||
build(defaultPodGenTaskName) {
|
||||
assertTasksExecuted(defaultPodGenTaskName)
|
||||
}
|
||||
|
||||
build(defaultPodGenTaskName) {
|
||||
assertTasksUpToDate(defaultPodGenTaskName)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun doTestGit(
|
||||
gradleVersion: GradleVersion,
|
||||
projectName: String = templateProjectName,
|
||||
repo: String = defaultPodRepo,
|
||||
pod: String = defaultPodName,
|
||||
branch: String? = null,
|
||||
commit: String? = null,
|
||||
tag: String? = null,
|
||||
isGradleBuildScript: Boolean = false,
|
||||
testImportAssertions: BuildResult.() -> Unit = {},
|
||||
block: TestProject.() -> Unit = {},
|
||||
) {
|
||||
|
||||
nativeProjectWithCocoapodsAndIosAppPodFile(projectName, gradleVersion) {
|
||||
val buildScript = if (isGradleBuildScript) buildGradle else buildGradleKts
|
||||
buildScript.addPod(pod, produceGitBlock(repo, branch, commit, tag))
|
||||
|
||||
testImport(listOf(repo)) {
|
||||
podImportAsserts(buildScript)
|
||||
testImportAssertions()
|
||||
}
|
||||
block()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun produceGitBlock(
|
||||
repo: String = defaultPodRepo,
|
||||
branchName: String? = null,
|
||||
commitName: String? = null,
|
||||
tagName: String? = null,
|
||||
): String {
|
||||
val branch = if (branchName != null) "branch = \"$branchName\"" else ""
|
||||
val commit = if (commitName != null) "commit = \"$commitName\"" else ""
|
||||
val tag = if (tagName != null) "tag = \"$tagName\"" else ""
|
||||
return """source = git("$repo") {
|
||||
| $branch
|
||||
| $commit
|
||||
| $tag
|
||||
|}
|
||||
""".trimMargin()
|
||||
}
|
||||
|
||||
private fun BuildResult.podImportAsserts(
|
||||
buildScript: Path,
|
||||
projectName: String? = null,
|
||||
) {
|
||||
|
||||
val buildScriptText = buildScript.readText()
|
||||
val taskPrefix = projectName?.let { ":$it" } ?: ""
|
||||
val podspec = "podspec"
|
||||
|
||||
if ("noPodspec()" in buildScriptText) {
|
||||
assertTasksSkipped("$taskPrefix:$podspec")
|
||||
}
|
||||
|
||||
if ("podfile" in buildScriptText) {
|
||||
assertTasksExecuted("$taskPrefix$podInstallTaskName")
|
||||
} else {
|
||||
assertTasksSkipped("$taskPrefix$podInstallTaskName")
|
||||
}
|
||||
if (buildScriptText.matches("pod\\(.*\\)".toRegex())) {
|
||||
assertTasksExecuted(listOf("$taskPrefix:$POD_GEN_TASK_NAME"))
|
||||
}
|
||||
|
||||
with(listOf(POD_SETUP_BUILD_TASK_NAME, POD_BUILD_TASK_NAME).map { "$taskPrefix:$it" }) {
|
||||
if (buildScriptText.matches("pod\\(.*\\)".toRegex())) {
|
||||
assertTasksExecuted(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun isRepoAvailable(repos: List<String>) = runBlocking {
|
||||
HttpClient(CIO).use { client ->
|
||||
val nonAvailableRepos = repos
|
||||
.map { repo ->
|
||||
async { repo to runCatching { client.get(repo).status }.recover { it }.getOrNull() }
|
||||
}
|
||||
.awaitAll()
|
||||
.filter { (_, status) -> status != HttpStatusCode.OK }
|
||||
Assumptions.assumeTrue(nonAvailableRepos.isEmpty()) {
|
||||
"The following repositories of ${repos.joinToString()} are not available: ${nonAvailableRepos.joinToString()}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun TestProject.testImport(
|
||||
repos: List<String> = listOf(defaultPodRepo),
|
||||
vararg args: String,
|
||||
assertions: BuildResult.() -> Unit = {},
|
||||
) {
|
||||
|
||||
isRepoAvailable(repos)
|
||||
|
||||
build(podImportTaskName, *args) {
|
||||
assertions()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+58
-520
@@ -13,7 +13,9 @@ import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Compan
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_INSTALL_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_SETUP_BUILD_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_SPEC_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.util.createTempDir
|
||||
import org.jetbrains.kotlin.gradle.testbase.ImportMode
|
||||
import org.jetbrains.kotlin.gradle.testbase.cocoaPodsEnvironmentVariables
|
||||
import org.jetbrains.kotlin.gradle.testbase.ensureCocoapodsInstalled
|
||||
import org.jetbrains.kotlin.gradle.util.modify
|
||||
import org.jetbrains.kotlin.gradle.util.runProcess
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
@@ -22,7 +24,6 @@ import org.junit.Before
|
||||
import org.junit.BeforeClass
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.util.*
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.zip.ZipFile
|
||||
@@ -40,7 +41,7 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
private val gradleVersion = GradleVersionRequired.FOR_MPP_SUPPORT
|
||||
|
||||
override fun defaultBuildOptions(): BuildOptions =
|
||||
super.defaultBuildOptions().copy(customEnvironmentVariables = getEnvs())
|
||||
super.defaultBuildOptions().copy(customEnvironmentVariables = cocoaPodsEnvironmentVariables())
|
||||
|
||||
private val podfileImportDirectivePlaceholder = "<import_mode_directive>"
|
||||
private val podfileImportPodPlaceholder = "#import_pod_directive"
|
||||
@@ -48,54 +49,24 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
private val cocoapodsSingleKtPod = "native-cocoapods-single"
|
||||
private val cocoapodsMultipleKtPods = "native-cocoapods-multiple"
|
||||
private val templateProjectName = "native-cocoapods-template"
|
||||
private val groovyTemplateProjectName = "native-cocoapods-template-groovy"
|
||||
private val cocoapodsTestsProjectName = "native-cocoapods-tests"
|
||||
private val cocoapodsCommonizationProjectName = "native-cocoapods-commonization"
|
||||
|
||||
private val dummyTaskName = ":$DUMMY_FRAMEWORK_TASK_NAME"
|
||||
private val podspecTaskName = ":$POD_SPEC_TASK_NAME"
|
||||
private val podGenTaskName = ":$POD_GEN_TASK_NAME"
|
||||
private val podBuildTaskName = ":$POD_BUILD_TASK_NAME"
|
||||
private val podSetupBuildTaskName = ":$POD_SETUP_BUILD_TASK_NAME"
|
||||
private val podImportTaskName = ":$POD_IMPORT_TASK_NAME"
|
||||
private val podInstallTaskName = ":$POD_INSTALL_TASK_NAME"
|
||||
private val cinteropTaskName = ":cinterop"
|
||||
|
||||
private val defaultPodRepo = "https://github.com/AFNetworking/AFNetworking"
|
||||
private val defaultPodName = "AFNetworking"
|
||||
private val defaultTarget = "IOS"
|
||||
private val defaultFamily = "ios"
|
||||
private val defaultSDK = "iphonesimulator"
|
||||
private val defaultPodGenTaskName = podGenFullTaskName()
|
||||
private val defaultPodInstallSyntheticTaskName = ":podInstallSyntheticIos"
|
||||
private val defaultBuildTaskName = podBuildFullTaskName()
|
||||
private val defaultSetupBuildTaskName = podSetupBuildFullTaskName()
|
||||
private val defaultCinteropTaskName = cinteropTaskName + defaultPodName + defaultTarget
|
||||
|
||||
private fun podGenFullTaskName(familyName: String = defaultFamily) =
|
||||
podGenTaskName + familyName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }
|
||||
|
||||
private fun podSetupBuildFullTaskName(podName: String = defaultPodName, sdkName: String = defaultSDK) =
|
||||
podSetupBuildTaskName + podName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } + sdkName.replaceFirstChar {
|
||||
if (it.isLowerCase()) it.titlecase(
|
||||
Locale.getDefault()
|
||||
) else it.toString()
|
||||
}
|
||||
|
||||
private fun podBuildFullTaskName(podName: String = defaultPodName, sdkName: String = defaultSDK) =
|
||||
podBuildTaskName + podName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } + sdkName.replaceFirstChar {
|
||||
if (it.isLowerCase()) it.titlecase(
|
||||
Locale.getDefault()
|
||||
) else it.toString()
|
||||
}
|
||||
|
||||
private fun cinteropFullTaskName(podName: String = defaultPodName, targetName: String = defaultTarget) =
|
||||
cinteropTaskName + podName.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } + targetName.replaceFirstChar {
|
||||
if (it.isLowerCase()) it.titlecase(
|
||||
Locale.getDefault()
|
||||
) else it.toString()
|
||||
}
|
||||
|
||||
private lateinit var hooks: CustomHooks
|
||||
private lateinit var project: BaseGradleIT.Project
|
||||
|
||||
@@ -154,7 +125,8 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
@Test
|
||||
fun testSyntheticProjectPodfileGeneration() {
|
||||
val gradleProject = transformProjectWithPluginsDsl(cocoapodsSingleKtPod, gradleVersion)
|
||||
gradleProject.gradleBuildScript().appendToCocoapodsBlock("""
|
||||
gradleProject.gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
ios.deploymentTarget = "14.1"
|
||||
pod("SSZipArchive")
|
||||
pod("AFNetworking", "~> 4.0.1")
|
||||
@@ -163,7 +135,8 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
tag = "5.6.1"
|
||||
}
|
||||
}
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
gradleProject.build("podInstallSyntheticIos", "-Pkotlin.native.cocoapods.generate.wrapper=true") {
|
||||
assertSuccessful()
|
||||
assertTasksExecuted(":podGenIos")
|
||||
@@ -184,14 +157,16 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
project.gradleBuildScript().apply {
|
||||
appendToCocoapodsBlock("""pod("ChatSDK", version = "5.2.1")""")
|
||||
|
||||
appendText("""
|
||||
appendText(
|
||||
"""
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.targets.native.tasks.PodGenTask>().configureEach {
|
||||
doLast {
|
||||
podfile.get().appendText("ENV['SWIFT_VERSION'] = '5'")
|
||||
}
|
||||
}
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
project.build("podInstallSyntheticIos", "-Pkotlin.native.cocoapods.generate.wrapper=true") {
|
||||
@@ -200,65 +175,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodDownloadGitNoTagNorCommit() {
|
||||
doTestGit()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodDownloadGitTag() {
|
||||
doTestGit(tag = "4.0.0")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodDownloadGitCommit() {
|
||||
doTestGit(commit = "9c07ac0a5645abb58850253eeb109ed0dca515c1")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodDownloadGitBranch() {
|
||||
doTestGit(branch = "2974")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodDownloadGitSubspec() {
|
||||
doTestGit(
|
||||
repo = "https://github.com/SDWebImage/SDWebImage.git",
|
||||
pod = "SDWebImage/MapKit",
|
||||
tag = "5.9.2"
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodDownloadGitBranchAndCommit() {
|
||||
val branch = "2974"
|
||||
val commit = "21637dd6164c0641e414bdaf3885af6f1ef15aee"
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo, branchName = branch, commitName = commit))
|
||||
}
|
||||
project.testImportWithAsserts(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
// tag priority is bigger than branch priority
|
||||
@Test
|
||||
fun testPodDownloadGitBranchAndTag() {
|
||||
val branch = "2974"
|
||||
val tag = "4.0.0"
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo, branchName = branch, tagName = tag))
|
||||
}
|
||||
project.testImportWithAsserts(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testDownloadAndImport() {
|
||||
val tag = "4.0.0"
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo, tagName = tag))
|
||||
}
|
||||
project.testImportWithAsserts(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun warnIfDeprecatedPodspecPathIsUsed() {
|
||||
project = getProjectByName(cocoapodsSingleKtPod)
|
||||
@@ -306,13 +222,15 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
@Test
|
||||
fun testImportUTDAfterLinkingFramework() {
|
||||
val linkTaskName = ":linkPodDebugFrameworkIOS"
|
||||
project.gradleBuildScript().appendToCocoapodsBlock("""
|
||||
project.gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
framework {
|
||||
baseName = "kotlin-library"
|
||||
}
|
||||
name = "kotlin-library"
|
||||
podfile = project.file("ios-app/Podfile")
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
|
||||
hooks.addHook {
|
||||
@@ -335,13 +253,15 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun testChangeFrameworkTypeUTD() {
|
||||
project.gradleBuildScript().appendToCocoapodsBlock("""
|
||||
project.gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
framework {
|
||||
baseName = "kotlin-library"
|
||||
}
|
||||
name = "kotlin-library"
|
||||
podfile = project.file("ios-app/Podfile")
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
hooks.addHook {
|
||||
assertTasksExecuted(dummyTaskName)
|
||||
@@ -371,31 +291,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Test
|
||||
fun basicUTDTest() {
|
||||
val tasks = listOf(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
defaultPodInstallSyntheticTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName,
|
||||
)
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo))
|
||||
}
|
||||
hooks.addHook {
|
||||
assertTasksExecuted(tasks)
|
||||
}
|
||||
project.testImportWithAsserts(listOf(defaultPodRepo))
|
||||
|
||||
hooks.rewriteHooks {
|
||||
assertTasksUpToDate(tasks)
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testSpecReposUTD() {
|
||||
with(project.gradleBuildScript()) {
|
||||
@@ -433,53 +328,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
project.testSynthetic(defaultPodInstallSyntheticTaskName)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUTDPodAdded() {
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo))
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
|
||||
val anotherPodName = "Alamofire"
|
||||
val anotherPodRepo = "https://github.com/Alamofire/Alamofire"
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(anotherPodName, produceGitBlock(anotherPodRepo))
|
||||
}
|
||||
hooks.rewriteHooks {
|
||||
assertTasksExecuted(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
podSetupBuildFullTaskName(anotherPodName),
|
||||
podBuildFullTaskName(anotherPodName),
|
||||
cinteropFullTaskName(anotherPodName)
|
||||
)
|
||||
assertTasksUpToDate(
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo, anotherPodRepo))
|
||||
|
||||
with(project.gradleBuildScript()) {
|
||||
removePod(anotherPodName)
|
||||
}
|
||||
hooks.rewriteHooks {
|
||||
assertTasksNotRegisteredByPrefix(
|
||||
listOf(
|
||||
podBuildFullTaskName(anotherPodName),
|
||||
cinteropFullTaskName(anotherPodName)
|
||||
)
|
||||
)
|
||||
assertTasksUpToDate(
|
||||
defaultBuildTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testImportSubspecs() {
|
||||
with(project.gradleBuildScript()) {
|
||||
@@ -489,62 +337,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUTDTargetAdded() {
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo))
|
||||
appendToCocoapodsBlock("osx.deploymentTarget = \"10.15\"")
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
|
||||
val anotherTarget = "MacosX64"
|
||||
val anotherSdk = "macosx"
|
||||
val anotherFamily = "macos"
|
||||
with(project.gradleBuildScript()) {
|
||||
appendToKotlinBlock(anotherTarget.replaceFirstChar { it.lowercase(Locale.getDefault()) } + "()")
|
||||
}
|
||||
hooks.rewriteHooks {
|
||||
assertTasksExecuted(
|
||||
podGenFullTaskName(anotherFamily),
|
||||
podSetupBuildFullTaskName(sdkName = anotherSdk),
|
||||
podBuildFullTaskName(sdkName = anotherSdk),
|
||||
cinteropFullTaskName(targetName = anotherTarget)
|
||||
)
|
||||
assertTasksUpToDate(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
|
||||
with(project.gradleBuildScript()) {
|
||||
var text = readText()
|
||||
text = text.replace(anotherTarget.replaceFirstChar { it.lowercase(Locale.getDefault()) } + "()", "")
|
||||
writeText(text)
|
||||
}
|
||||
hooks.rewriteHooks {
|
||||
assertTasksNotRegisteredByPrefix(
|
||||
listOf(
|
||||
podGenFullTaskName(anotherFamily),
|
||||
podSetupBuildFullTaskName(sdkName = anotherSdk),
|
||||
podBuildFullTaskName(sdkName = anotherSdk),
|
||||
cinteropFullTaskName(targetName = anotherTarget)
|
||||
)
|
||||
)
|
||||
assertTasksUpToDate(
|
||||
podspecTaskName,
|
||||
defaultPodGenTaskName,
|
||||
defaultSetupBuildTaskName,
|
||||
defaultBuildTaskName,
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
project.testImport(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUTDPodspec() {
|
||||
project.testWithWrapper(podspecTaskName)
|
||||
@@ -580,83 +372,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
project.testWithWrapper(podspecTaskName)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUTDPodGen() {
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName)
|
||||
}
|
||||
val repos = listOf(
|
||||
"https://github.com/alozhkin/spec_repo_example",
|
||||
"https://github.com/alozhkin/spec_repo_example_2"
|
||||
)
|
||||
for (repo in repos) {
|
||||
assumeTrue(isRepoAvailable(repo))
|
||||
}
|
||||
hooks.addHook {
|
||||
assertTasksExecuted(defaultPodGenTaskName)
|
||||
}
|
||||
project.testSynthetic(defaultPodGenTaskName)
|
||||
with(project.gradleBuildScript()) {
|
||||
addSpecRepo("https://github.com/alozhkin/spec_repo_example")
|
||||
}
|
||||
project.testSynthetic(defaultPodGenTaskName)
|
||||
with(project.gradleBuildScript()) {
|
||||
addSpecRepo("https://github.com/alozhkin/spec_repo_example_2")
|
||||
}
|
||||
project.testSynthetic(defaultPodGenTaskName)
|
||||
hooks.rewriteHooks {
|
||||
assertTasksUpToDate(defaultPodGenTaskName)
|
||||
}
|
||||
project.testSynthetic(defaultPodGenTaskName)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUTDBuild() {
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock())
|
||||
}
|
||||
hooks.addHook {
|
||||
assertTasksExecuted(defaultBuildTaskName)
|
||||
}
|
||||
project.testImport()
|
||||
|
||||
val anotherTarget = "MacosX64"
|
||||
val anotherSdk = "macosx"
|
||||
with(project.gradleBuildScript()) {
|
||||
appendToCocoapodsBlock("osx.deploymentTarget = \"10.15\"")
|
||||
appendToKotlinBlock(anotherTarget.replaceFirstChar { it.lowercase(Locale.getDefault()) } + "()")
|
||||
}
|
||||
val anotherSdkDefaultPodTaskName = podBuildFullTaskName(sdkName = anotherSdk)
|
||||
hooks.rewriteHooks {
|
||||
assertTasksUpToDate(defaultBuildTaskName)
|
||||
assertTasksExecuted(anotherSdkDefaultPodTaskName)
|
||||
}
|
||||
project.testImport()
|
||||
|
||||
hooks.rewriteHooks {
|
||||
assertTasksUpToDate(defaultBuildTaskName, anotherSdkDefaultPodTaskName)
|
||||
}
|
||||
project.testImport()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodBuildUTDClean() {
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock())
|
||||
}
|
||||
hooks.addHook {
|
||||
assertTasksExecuted(defaultBuildTaskName)
|
||||
}
|
||||
project.testImport()
|
||||
|
||||
hooks.rewriteHooks {}
|
||||
project.test(":clean")
|
||||
|
||||
hooks.addHook {
|
||||
assertTasksExecuted(defaultBuildTaskName)
|
||||
}
|
||||
project.testImport()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testPodInstallWithoutPodFile() {
|
||||
@@ -664,19 +379,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
}
|
||||
|
||||
|
||||
// groovy tests
|
||||
|
||||
@Test
|
||||
fun testGroovyDownloadAndImport() {
|
||||
val project = getProjectByName(groovyTemplateProjectName)
|
||||
val tag = "4.0.0"
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(defaultPodName, produceGitBlock(defaultPodRepo, tagName = tag))
|
||||
}
|
||||
project.testImportWithAsserts(listOf(defaultPodRepo))
|
||||
}
|
||||
|
||||
|
||||
// other tests
|
||||
|
||||
@Test
|
||||
@@ -742,47 +444,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUseDynamicFramework() {
|
||||
with(project) {
|
||||
gradleBuildScript().addPod(defaultPodName, produceGitBlock(defaultPodRepo))
|
||||
gradleBuildScript().appendToFrameworkBlock("isStatic = false")
|
||||
hooks.addHook {
|
||||
// Check that an output framework is a dynamic framework
|
||||
val framework = fileInWorkingDir("build/bin/iOS/podDebugFramework/cocoapods.framework/cocoapods")
|
||||
with(runProcess(listOf("file", framework.absolutePath), projectDir, environmentVariables = getEnvs())) {
|
||||
assertTrue(isSuccessful)
|
||||
assertTrue(output.contains("dynamically linked shared library"))
|
||||
}
|
||||
}
|
||||
|
||||
test(
|
||||
"linkPodDebugFrameworkIOS",
|
||||
"-Pkotlin.native.cocoapods.generate.wrapper=true"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUseStaticFramework() {
|
||||
with(project) {
|
||||
gradleBuildScript().addPod(defaultPodName, produceGitBlock(defaultPodRepo))
|
||||
gradleBuildScript().appendToFrameworkBlock("isStatic = true")
|
||||
hooks.addHook {
|
||||
// Check that an output framework is a static framework
|
||||
val framework = fileInWorkingDir("build/bin/iOS/podDebugFramework/cocoapods.framework/cocoapods")
|
||||
with(runProcess(listOf("file", framework.absolutePath), projectDir, environmentVariables = getEnvs())) {
|
||||
assertTrue(isSuccessful)
|
||||
kotlin.test.assertContains(output, "current ar archive")
|
||||
}
|
||||
}
|
||||
|
||||
test(
|
||||
"linkPodDebugFrameworkIOS",
|
||||
"-Pkotlin.native.cocoapods.generate.wrapper=true"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCocoapodsWithRegularFrameworkDefinition() {
|
||||
@@ -970,23 +631,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
getProjectByName(cocoapodsTestsProjectName).testWithWrapper(":iosX64Test")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCinteropUpToDate() {
|
||||
project.gradleBuildScript().addPod(defaultPodName, produceGitBlock(defaultPodRepo))
|
||||
project.testImport()
|
||||
hooks.addHook {
|
||||
assertTasksUpToDate(
|
||||
defaultCinteropTaskName
|
||||
)
|
||||
}
|
||||
project.test(
|
||||
"syncFramework",
|
||||
"-Pkotlin.native.cocoapods.platform=iphonesimulator",
|
||||
"-Pkotlin.native.cocoapods.archs=x86_64",
|
||||
"-Pkotlin.native.cocoapods.configuration=Debug",
|
||||
"-Pkotlin.native.cocoapods.generate.wrapper=true"
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testCinteropCommonizationOff() {
|
||||
@@ -1116,11 +760,13 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun testLinkOnlyPods() = with(project) {
|
||||
gradleBuildScript().appendToCocoapodsBlock("""
|
||||
gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
pod("AFNetworking") { linkOnly = true }
|
||||
pod("SSZipArchive", linkOnly = true)
|
||||
pod("SDWebImage/Core")
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(
|
||||
":linkPodDebugFrameworkIOS",
|
||||
@@ -1136,31 +782,37 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
assertTasksNotRegistered(":cinteropAFNetworkingIOS")
|
||||
assertTasksNotRegistered(":cinteropSSZipArchiveIOS")
|
||||
|
||||
assertContains("""
|
||||
assertContains(
|
||||
"""
|
||||
| -linker-option
|
||||
| -framework
|
||||
| -linker-option
|
||||
| AFNetworking
|
||||
""".trimMargin())
|
||||
""".trimMargin()
|
||||
)
|
||||
|
||||
assertContains("""
|
||||
assertContains(
|
||||
"""
|
||||
| -linker-option
|
||||
| -framework
|
||||
| -linker-option
|
||||
| SSZipArchive
|
||||
""".trimMargin())
|
||||
""".trimMargin()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testUsageLinkOnlyWithStaticFrameworkProducesMessage() = with(project) {
|
||||
gradleBuildScript().appendToCocoapodsBlock("""
|
||||
gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
framework {
|
||||
isStatic = true
|
||||
}
|
||||
|
||||
pod("AFNetworking") { linkOnly = true }
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(
|
||||
":linkPodDebugFrameworkIOS",
|
||||
@@ -1184,9 +836,11 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun `configuration fails when trying to depend on non-declared pod`() = with(getProjectByName("native-cocoapods-dependant-pods")) {
|
||||
gradleBuildScript().appendToCocoapodsBlock("""
|
||||
gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
pod("Foo") { useInteropBindingFrom("JBNonExistent") }
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(
|
||||
":help",
|
||||
@@ -1199,10 +853,12 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun `configuration fails when dependant pods are in the wrong order`() = with(getProjectByName("native-cocoapods-dependant-pods")) {
|
||||
gradleBuildScript().appendToCocoapodsBlock("""
|
||||
gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
pod("Foo") { useInteropBindingFrom("Bar") }
|
||||
pod("Bar")
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(
|
||||
":help",
|
||||
@@ -1215,9 +871,11 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
@Test
|
||||
fun `configuration fails when pod depends on itself`() = with(getProjectByName("native-cocoapods-dependant-pods")) {
|
||||
gradleBuildScript().appendToCocoapodsBlock("""
|
||||
gradleBuildScript().appendToCocoapodsBlock(
|
||||
"""
|
||||
pod("Foo") { useInteropBindingFrom("Foo") }
|
||||
""".trimIndent())
|
||||
""".trimIndent()
|
||||
)
|
||||
|
||||
build(
|
||||
":help",
|
||||
@@ -1249,22 +907,10 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun doTestGit(
|
||||
repo: String = defaultPodRepo,
|
||||
pod: String = defaultPodName,
|
||||
branch: String? = null,
|
||||
commit: String? = null,
|
||||
tag: String? = null
|
||||
) {
|
||||
with(project.gradleBuildScript()) {
|
||||
addPod(pod, produceGitBlock(repo, branch, commit, tag))
|
||||
}
|
||||
project.testImportWithAsserts(listOf(repo))
|
||||
}
|
||||
|
||||
private fun Project.testImportWithAsserts(
|
||||
repos: List<String> = listOf(),
|
||||
vararg args: String
|
||||
vararg args: String,
|
||||
) {
|
||||
hooks.addHook {
|
||||
podImportAsserts()
|
||||
@@ -1274,7 +920,7 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
private fun Project.testImport(
|
||||
repos: List<String> = listOf(),
|
||||
vararg args: String
|
||||
vararg args: String,
|
||||
) {
|
||||
for (repo in repos) {
|
||||
assumeTrue(isRepoAvailable(repo))
|
||||
@@ -1284,21 +930,21 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
private fun Project.testSynthetic(
|
||||
taskName: String,
|
||||
vararg args: String
|
||||
vararg args: String,
|
||||
) {
|
||||
testWithWrapper(taskName, *args)
|
||||
}
|
||||
|
||||
private fun Project.testWithWrapper(
|
||||
taskName: String,
|
||||
vararg args: String
|
||||
vararg args: String,
|
||||
) {
|
||||
test(taskName, "-Pkotlin.native.cocoapods.generate.wrapper=true", *args)
|
||||
}
|
||||
|
||||
private fun Project.test(
|
||||
taskName: String,
|
||||
vararg args: String
|
||||
vararg args: String,
|
||||
) {
|
||||
|
||||
// check that test executable
|
||||
@@ -1320,25 +966,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
appendToCocoapodsBlock(podBlock)
|
||||
}
|
||||
|
||||
private fun File.removePod(podName: String) {
|
||||
val text = readText()
|
||||
val begin = text.indexOf("""pod("$podName")""")
|
||||
require(begin != -1) { "Pod doesn't exist in file" }
|
||||
var index = begin + """pod("$podName")""".length - 1
|
||||
if (text.indexOf("""pod("$podName") {""", startIndex = begin) != -1) {
|
||||
index += 2
|
||||
var bracket = 1
|
||||
while (bracket != 0) {
|
||||
if (text[++index] == '{') {
|
||||
bracket++
|
||||
} else if (text[index] == '}') {
|
||||
bracket--
|
||||
}
|
||||
}
|
||||
}
|
||||
writeText(text.removeRange(begin..index))
|
||||
}
|
||||
|
||||
private fun File.addSpecRepo(specRepo: String) = appendToCocoapodsBlock("url(\"$specRepo\")".wrap("specRepos"))
|
||||
|
||||
private fun File.appendToKotlinBlock(str: String) = appendLine(str.wrap("kotlin"))
|
||||
@@ -1355,23 +982,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
private fun File.appendLine(s: String) = appendText("\n$s")
|
||||
|
||||
private fun produceGitBlock(
|
||||
repo: String = defaultPodRepo,
|
||||
branchName: String? = null,
|
||||
commitName: String? = null,
|
||||
tagName: String? = null
|
||||
): String {
|
||||
val branch = if (branchName != null) "branch = \"$branchName\"" else ""
|
||||
val commit = if (commitName != null) "commit = \"$commitName\"" else ""
|
||||
val tag = if (tagName != null) "tag = \"$tagName\"" else ""
|
||||
return """source = git("$repo") {
|
||||
| $branch
|
||||
| $commit
|
||||
| $tag
|
||||
|}
|
||||
""".trimMargin()
|
||||
}
|
||||
|
||||
|
||||
// proposition phase
|
||||
|
||||
@@ -1426,15 +1036,10 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
}
|
||||
}
|
||||
|
||||
private enum class ImportMode(val directive: String) {
|
||||
FRAMEWORKS("use_frameworks!"),
|
||||
MODULAR_HEADERS("use_modular_headers!")
|
||||
}
|
||||
|
||||
private data class CommandResult(
|
||||
val exitCode: Int,
|
||||
val stdOut: String,
|
||||
val stdErr: String
|
||||
val stdErr: String,
|
||||
)
|
||||
|
||||
private fun runCommand(
|
||||
@@ -1443,11 +1048,11 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
vararg args: String,
|
||||
timeoutSec: Long = 120,
|
||||
inheritIO: Boolean = false,
|
||||
block: CommandResult.() -> Unit
|
||||
block: CommandResult.() -> Unit,
|
||||
) {
|
||||
val process = ProcessBuilder(command, *args).apply {
|
||||
directory(workingDir)
|
||||
environment().putAll(getEnvs())
|
||||
environment().putAll(cocoaPodsEnvironmentVariables())
|
||||
if (inheritIO) {
|
||||
inheritIO()
|
||||
}
|
||||
@@ -1523,79 +1128,12 @@ class CocoaPodsIT : BaseGradleIT() {
|
||||
|
||||
@BeforeClass
|
||||
@JvmStatic
|
||||
fun ensureCocoapodsInstalled() {
|
||||
fun checkCocoapodsInstalled() {
|
||||
if (!HostManager.hostIsMac) {
|
||||
return
|
||||
}
|
||||
|
||||
if (shouldInstallLocalCocoapods) {
|
||||
val installDir = cocoapodsInstallationRoot.absolutePath
|
||||
println("Installing CocoaPods...")
|
||||
|
||||
//https://github.com/ffi/ffi/issues/864#issuecomment-875242776
|
||||
gem("install", "--install-dir", installDir, "ffi", "-v", "1.15.5", "--", "--enable-libffi-alloc")
|
||||
|
||||
gem("install", "--install-dir", installDir, "cocoapods", "-v", localCocoapodsVersion)
|
||||
} else if (!isCocoapodsInstalled()) {
|
||||
fail(
|
||||
"""
|
||||
Running CocoaPods integration tests requires cocoapods to be installed.
|
||||
Please install them manually:
|
||||
gem install cocoapods
|
||||
Or re-run the tests with the 'installCocoapods=true' Gradle property.
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private const val localCocoapodsVersion = "1.11.0"
|
||||
|
||||
private val shouldInstallLocalCocoapods: Boolean = System.getProperty("installCocoapods").toBoolean()
|
||||
|
||||
private val cocoapodsInstallationRoot: File by lazy { createTempDir("cocoapods") }
|
||||
private val cocoapodsBinPath: File by lazy {
|
||||
cocoapodsInstallationRoot.resolve("bin")
|
||||
}
|
||||
|
||||
private fun getEnvs(): Map<String, String> {
|
||||
if (!shouldInstallLocalCocoapods) {
|
||||
return emptyMap()
|
||||
}
|
||||
|
||||
val path = cocoapodsBinPath.absolutePath + File.pathSeparator + System.getenv("PATH")
|
||||
val gemPath = System.getenv("GEM_PATH")?.let {
|
||||
cocoapodsInstallationRoot.absolutePath + File.pathSeparator + it
|
||||
} ?: cocoapodsInstallationRoot.absolutePath
|
||||
return mapOf(
|
||||
"PATH" to path,
|
||||
"GEM_PATH" to gemPath,
|
||||
// CocoaPods 1.11 requires UTF-8 locale being set, more details: https://github.com/CocoaPods/CocoaPods/issues/10939
|
||||
"LC_ALL" to "en_US.UTF-8"
|
||||
)
|
||||
}
|
||||
|
||||
private fun isCocoapodsInstalled(): Boolean {
|
||||
// Do not use 'gem list' because the gem may be installed but PATH may miss its executables.
|
||||
// Try to access the pod executable directly instead
|
||||
return try {
|
||||
val result = runProcess(
|
||||
listOf("pod", "--version"),
|
||||
File("."),
|
||||
)
|
||||
result.isSuccessful
|
||||
} catch (e: IOException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun gem(vararg args: String): String {
|
||||
val command = listOf("gem", *args)
|
||||
println("Run command: ${command.joinToString(separator = " ")}")
|
||||
val result = runProcess(command, File("."), options = BuildOptions(forceOutputToStdout = true))
|
||||
check(result.isSuccessful) {
|
||||
"Process 'gem ${args.joinToString(separator = " ")}' exited with error code ${result.exitCode}. See log for details."
|
||||
}
|
||||
return result.output
|
||||
ensureCocoapodsInstalled()
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
-24
@@ -6,10 +6,11 @@
|
||||
package org.jetbrains.kotlin.gradle.native
|
||||
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_INSTALL_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.testbase.*
|
||||
import org.jetbrains.kotlin.gradle.util.assertProcessRunResult
|
||||
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||
import org.jetbrains.kotlin.gradle.util.runProcess
|
||||
import org.junit.jupiter.api.BeforeAll
|
||||
import org.junit.jupiter.api.DisplayName
|
||||
import org.junit.jupiter.api.condition.OS
|
||||
import java.nio.file.Path
|
||||
@@ -24,18 +25,16 @@ import kotlin.test.assertEquals
|
||||
@OptIn(EnvironmentalVariablesOverride::class)
|
||||
class CocoaPodsXcodeIT : KGPBaseTest() {
|
||||
|
||||
private val podfileImportDirectivePlaceholder = "<import_mode_directive>"
|
||||
|
||||
private val cocoapodsSingleKtPod = "native-cocoapods-single"
|
||||
private val cocoapodsMultipleKtPods = "native-cocoapods-multiple"
|
||||
private val templateProjectName = "native-cocoapods-template"
|
||||
|
||||
private val environmentVariables = EnvironmentalVariables(
|
||||
mapOf(
|
||||
// CocoaPods 1.11 requires UTF-8 locale being set, more details: https://github.com/CocoaPods/CocoaPods/issues/10939
|
||||
"LC_ALL" to "en_US.UTF-8"
|
||||
)
|
||||
)
|
||||
private val environmentVariables = EnvironmentalVariables(cocoaPodsEnvironmentVariables())
|
||||
|
||||
@BeforeAll
|
||||
fun setUp() {
|
||||
ensureCocoapodsInstalled()
|
||||
}
|
||||
|
||||
@DisplayName("Checks xcodebuild for ios-app with a single framework")
|
||||
@GradleTest
|
||||
@@ -142,20 +141,6 @@ class CocoaPodsXcodeIT : KGPBaseTest() {
|
||||
mapOf("kotlin-library" to "FirstMultiplatformLibrary", "second-library" to "SecondMultiplatformLibrary")
|
||||
)
|
||||
|
||||
private enum class ImportMode(val directive: String) {
|
||||
FRAMEWORKS("use_frameworks!"),
|
||||
MODULAR_HEADERS("use_modular_headers!")
|
||||
}
|
||||
|
||||
private fun TestProject.preparePodfile(iosAppLocation: String, mode: ImportMode) {
|
||||
val iosAppDir = projectPath.resolve(iosAppLocation)
|
||||
|
||||
// Set import mode for Podfile.
|
||||
iosAppDir.resolve("Podfile")
|
||||
.takeIf { it.exists() }
|
||||
?.replaceText(podfileImportDirectivePlaceholder, mode.directive)
|
||||
}
|
||||
|
||||
private fun doTestXcode(
|
||||
projectName: String,
|
||||
gradleVersion: GradleVersion,
|
||||
@@ -208,7 +193,7 @@ class CocoaPodsXcodeIT : KGPBaseTest() {
|
||||
// Set import mode for Podfile.
|
||||
preparePodfile(it, mode)
|
||||
// Install pods.
|
||||
build("$taskPrefix:podInstall", buildOptions = buildOptions)
|
||||
build("$taskPrefix:$POD_INSTALL_TASK_NAME", buildOptions = buildOptions)
|
||||
|
||||
projectPath.resolve(it).apply {
|
||||
// Run Xcode build.
|
||||
|
||||
+12
@@ -68,6 +68,9 @@ data class BuildOptions(
|
||||
data class NativeOptions(
|
||||
val cacheKind: NativeCacheKind = NativeCacheKind.NONE,
|
||||
val cocoapodsGenerateWrapper: Boolean? = null,
|
||||
val cocoapodsPlatform: String? = null,
|
||||
val cocoapodsConfiguration: String? = null,
|
||||
val cocoapodsArchs: String? = null,
|
||||
val distributionType: String? = null,
|
||||
val distributionDownloadFromMaven: Boolean? = null,
|
||||
val platformLibrariesMode: String? = null,
|
||||
@@ -199,6 +202,15 @@ data class BuildOptions(
|
||||
nativeOptions.cocoapodsGenerateWrapper?.let {
|
||||
arguments.add("-Pkotlin.native.cocoapods.generate.wrapper=${it}")
|
||||
}
|
||||
nativeOptions.cocoapodsPlatform?.let {
|
||||
arguments.add("-Pkotlin.native.cocoapods.platform=${it}")
|
||||
}
|
||||
nativeOptions.cocoapodsArchs?.let {
|
||||
arguments.add("-Pkotlin.native.cocoapods.archs=${it}")
|
||||
}
|
||||
nativeOptions.cocoapodsConfiguration?.let {
|
||||
arguments.add("-Pkotlin.native.cocoapods.configuration=${it}")
|
||||
}
|
||||
|
||||
nativeOptions.distributionDownloadFromMaven?.let {
|
||||
arguments.add("-Pkotlin.native.distribution.downloadFromMaven=${it}")
|
||||
|
||||
+4
@@ -70,6 +70,10 @@ interface TestVersions {
|
||||
;
|
||||
}
|
||||
|
||||
object COCOAPODS {
|
||||
const val VERSION = "1.11.0"
|
||||
}
|
||||
|
||||
object AppleGradlePlugin {
|
||||
const val V222_0_21 = "222.4550-0.21"
|
||||
}
|
||||
|
||||
+195
-4
@@ -5,13 +5,25 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle.testbase
|
||||
|
||||
import org.gradle.util.GradleVersion
|
||||
import org.jetbrains.kotlin.gradle.BaseGradleIT
|
||||
import org.jetbrains.kotlin.gradle.plugin.cocoapods.KotlinCocoapodsPlugin.Companion.POD_INSTALL_TASK_NAME
|
||||
import org.jetbrains.kotlin.gradle.util.replaceText
|
||||
import org.jetbrains.kotlin.gradle.util.runProcess
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.appendText
|
||||
import kotlin.io.path.*
|
||||
import kotlin.test.fail
|
||||
|
||||
val String.normalizeCocoapadsFrameworkName: String
|
||||
get() = replace('-', '_')
|
||||
|
||||
enum class ImportMode(val directive: String) {
|
||||
FRAMEWORKS("use_frameworks!"),
|
||||
MODULAR_HEADERS("use_modular_headers!")
|
||||
}
|
||||
|
||||
fun TestProject.useCustomCocoapodsFrameworkName(
|
||||
subprojectName: String,
|
||||
frameworkName: String,
|
||||
@@ -34,10 +46,189 @@ fun TestProject.useCustomCocoapodsFrameworkName(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepares the Podfile for an iOS app in the [TestProject]
|
||||
*
|
||||
* @param iosAppLocation The relative location of the iOS app directory within the [TestProject]
|
||||
* @param mode The [ImportMode] to be set for the Podfile.
|
||||
*
|
||||
*/
|
||||
fun TestProject.preparePodfile(iosAppLocation: String, mode: ImportMode) {
|
||||
val iosAppDir = projectPath.resolve(iosAppLocation)
|
||||
|
||||
// Set import mode for Podfile.
|
||||
iosAppDir.resolve("Podfile")
|
||||
.takeIf { it.exists() }
|
||||
?.replaceText(podfileImportDirectivePlaceholder, mode.directive)
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps the given string into a specRepos block and adds this block to the end of the [this] path.
|
||||
*
|
||||
* @param specRepo The code to be wrapped with the Cocoapods block.
|
||||
*/
|
||||
|
||||
fun Path.addSpecRepo(specRepo: String) = addCocoapodsBlock("url(\"$specRepo\")".wrapIntoBlock("specRepos"))
|
||||
|
||||
/**
|
||||
* Wraps the given string into a Cocoapods block and adds this block to the end of the [this] path.
|
||||
*
|
||||
* @param str The code to be wrapped with the Cocoapods block.
|
||||
*/
|
||||
fun Path.addCocoapodsBlock(str: String) = addKotlinBlock(str.wrapIntoBlock("cocoapods"))
|
||||
|
||||
private fun Path.addKotlinBlock(str: String) = appendLine(str.wrapIntoBlock("kotlin"))
|
||||
/**
|
||||
* Wraps the given string into a Kotlin block and adds this block to the end of the [this] path.
|
||||
*
|
||||
* @param str The code to be wrapped with the Cocoapods block.
|
||||
*/
|
||||
fun Path.addKotlinBlock(str: String) = appendLine(str.wrapIntoBlock("kotlin"))
|
||||
|
||||
private fun Path.addFrameworkBlock(str: String) = addCocoapodsBlock(str.wrapIntoBlock("framework"))
|
||||
/**
|
||||
* Wraps the given string into a Framework block and adds this block to the end of the [this] path.
|
||||
*
|
||||
* @param str The code to be wrapped with the Cocoapods block.
|
||||
*/
|
||||
fun Path.addFrameworkBlock(str: String) = addCocoapodsBlock(str.wrapIntoBlock("framework"))
|
||||
|
||||
private fun Path.appendLine(s: String) = appendText("\n$s")
|
||||
|
||||
/**
|
||||
* Adds a Cocoapods dependency to [this] build script.
|
||||
*
|
||||
* @param podName The name of the Cocoapods dependency to be added.
|
||||
* @param configuration The optional configuration string for the Cocoapods dependency.
|
||||
*/
|
||||
fun Path.addPod(podName: String, configuration: String? = null) {
|
||||
val pod = "pod(\"$podName\")"
|
||||
val podBlock = configuration?.wrapIntoBlock(pod) ?: pod
|
||||
addCocoapodsBlock(podBlock)
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a Cocoapods dependency from [this] build script.
|
||||
*
|
||||
* @param podName The name of the Cocoapods dependency to be removes.
|
||||
*/
|
||||
fun Path.removePod(podName: String) {
|
||||
val text = readText()
|
||||
val begin = text.indexOf("""pod("$podName")""")
|
||||
require(begin != -1) {
|
||||
"""
|
||||
Pod doesn't exist in file. File content is:
|
||||
${text}
|
||||
""".trimIndent()
|
||||
}
|
||||
var index = begin + """pod("$podName")""".length - 1
|
||||
if (text.indexOf("""pod("$podName") {""", startIndex = begin) != -1) {
|
||||
index += 2
|
||||
var bracket = 1
|
||||
while (bracket != 0) {
|
||||
if (text[++index] == '{') {
|
||||
bracket++
|
||||
} else if (text[index] == '}') {
|
||||
bracket--
|
||||
}
|
||||
}
|
||||
}
|
||||
writeText(text.removeRange(begin..index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Method returns required environment variables for cocoapods tests with execution of [POD_INSTALL_TASK_NAME]
|
||||
*/
|
||||
fun cocoaPodsEnvironmentVariables(): Map<String, String> {
|
||||
if (!shouldInstallLocalCocoapods) {
|
||||
return emptyMap()
|
||||
}
|
||||
|
||||
val path = cocoapodsBinPath.absolutePathString() + File.pathSeparator + System.getenv("PATH")
|
||||
val gemPath = System.getenv("GEM_PATH")?.let {
|
||||
cocoapodsInstallationRoot.absolutePathString() + File.pathSeparator + it
|
||||
} ?: cocoapodsInstallationRoot.absolutePathString()
|
||||
return mapOf(
|
||||
"PATH" to path,
|
||||
"GEM_PATH" to gemPath,
|
||||
// CocoaPods 1.11 requires UTF-8 locale being set, more details: https://github.com/CocoaPods/CocoaPods/issues/10939
|
||||
"LC_ALL" to "en_US.UTF-8"
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks if Cocoapods should be installed and verifies its installation status.
|
||||
* If [shouldInstallLocalCocoapods] is true, it tries to install Cocoapods into the specified [cocoapodsInstallationRoot]
|
||||
* if it is not already installed.
|
||||
*
|
||||
* @throws AssertionError if [shouldInstallLocalCocoapods] is false and cocoapods has not been installed
|
||||
*/
|
||||
fun ensureCocoapodsInstalled() {
|
||||
if (shouldInstallLocalCocoapods) {
|
||||
val installDir = cocoapodsInstallationRoot.absolutePathString()
|
||||
println("Installing CocoaPods...")
|
||||
|
||||
//https://github.com/ffi/ffi/issues/864#issuecomment-875242776
|
||||
gem("install", "--install-dir", installDir, "ffi", "-v", "1.15.5", "--", "--enable-libffi-alloc")
|
||||
|
||||
gem("install", "--install-dir", installDir, "cocoapods", "-v", TestVersions.COCOAPODS.VERSION)
|
||||
} else if (!isCocoapodsInstalled()) {
|
||||
fail(
|
||||
"""
|
||||
Running CocoaPods integration tests requires cocoapods to be installed.
|
||||
Please install them manually:
|
||||
gem install cocoapods
|
||||
Or re-run the tests with the 'installCocoapods=true' Gradle property.
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@EnvironmentalVariablesOverride
|
||||
fun KGPBaseTest.nativeProjectWithCocoapodsAndIosAppPodFile(
|
||||
projectName: String = templateProjectName,
|
||||
gradleVersion: GradleVersion,
|
||||
buildOptions: BuildOptions = this.defaultBuildOptions,
|
||||
projectBlock: TestProject.() -> Unit = {},
|
||||
) {
|
||||
nativeProject(
|
||||
projectName,
|
||||
gradleVersion,
|
||||
buildOptions = buildOptions,
|
||||
environmentVariables = EnvironmentalVariables(cocoaPodsEnvironmentVariables())
|
||||
) {
|
||||
preparePodfile("ios-app", ImportMode.FRAMEWORKS)
|
||||
projectBlock()
|
||||
}
|
||||
}
|
||||
|
||||
private val templateProjectName = "native-cocoapods-template"
|
||||
|
||||
private val shouldInstallLocalCocoapods: Boolean = System.getProperty("installCocoapods").toBoolean()
|
||||
private val cocoapodsInstallationRoot: Path by lazy { createTempDirectory("cocoapods") }
|
||||
private val cocoapodsBinPath: Path by lazy { cocoapodsInstallationRoot.resolve("bin") }
|
||||
|
||||
private fun isCocoapodsInstalled(): Boolean {
|
||||
// Do not use 'gem list' because the gem may be installed but PATH may miss its executables.
|
||||
// Try to access the pod executable directly instead
|
||||
return try {
|
||||
val result = runProcess(
|
||||
listOf("pod", "--version"),
|
||||
File("."),
|
||||
)
|
||||
result.isSuccessful
|
||||
} catch (e: IOException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private fun gem(vararg args: String): String {
|
||||
val command = listOf("gem", *args)
|
||||
println("Run command: ${command.joinToString(separator = " ")}")
|
||||
val result = runProcess(command, File("."), options = BaseGradleIT.BuildOptions(forceOutputToStdout = true))
|
||||
check(result.isSuccessful) {
|
||||
"Process 'gem ${args.joinToString(separator = " ")}' exited with error code ${result.exitCode}. See log for details."
|
||||
}
|
||||
return result.output
|
||||
}
|
||||
|
||||
private fun Path.appendLine(s: String) = appendText("\n$s")
|
||||
|
||||
private const val podfileImportDirectivePlaceholder = "<import_mode_directive>"
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.gradle.apple.applePlugin") version "222.4550-0.21"
|
||||
id("org.jetbrains.gradle.apple.applePlugin") version <applePluginTestVersion>
|
||||
}
|
||||
|
||||
apple {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("org.jetbrains.kotlin.multiplatform").version("<pluginMarkerVersion>")
|
||||
id("org.jetbrains.kotlin.native.cocoapods").version("<pluginMarkerVersion>")
|
||||
id("org.jetbrains.kotlin.multiplatform")
|
||||
id("org.jetbrains.kotlin.native.cocoapods")
|
||||
}
|
||||
|
||||
group = "com.example"
|
||||
|
||||
Reference in New Issue
Block a user