- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2
 
Add support for multiplatform targets #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            asnaeb
  wants to merge
  6
  commits into
  iamcalledrob:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
asnaeb:master
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            6 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      8a92698
              
                Added support for all platforms and updated dependencies
              
              
                 851d2e7
              
                Removed metadata dir
              
              
                 a12af23
              
                Added metadata dir to gitignore
              
              
                 b9331c7
              
                Use github actions to publish and further dependencies update
              
              
                 f19f99a
              
                Updated README
              
              
                 e59f0f6
              
                Added fixed SmoothCircleShape to match CircleShape
              
              
                 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Publish | ||
| on: | ||
| release: | ||
| types: [released, prereleased] | ||
| jobs: | ||
| publish: | ||
| name: Release build and publish | ||
| runs-on: macOS-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'zulu' | ||
| java-version: 21 | ||
| - name: Publish to MavenCentral | ||
| run: ./gradlew publishToMavenCentral --no-configuration-cache | ||
| env: | ||
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | ||
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | ||
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }} | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,16 +1,14 @@ | ||
| import com.vanniktech.maven.publish.JavadocJar | ||
| import com.vanniktech.maven.publish.KotlinMultiplatform | ||
| import com.vanniktech.maven.publish.SonatypeHost | ||
| import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl | ||
| 
     | 
||
| plugins { | ||
| kotlin("multiplatform") version "2.2.10" | ||
| id("org.jetbrains.kotlin.plugin.compose") version "2.2.10" | ||
| id("org.jetbrains.compose") version "1.8.2" | ||
| id("com.android.library") version "8.2.2" | ||
| id("com.android.library") version "8.11.1" | ||
| 
     | 
||
| id("signing") | ||
| id("com.vanniktech.maven.publish") version "0.29.0" | ||
| id("com.vanniktech.maven.publish") version "0.34.0" | ||
| } | ||
| 
     | 
||
| group = "io.github.iamcalledrob" | ||
| 
        
          
        
         | 
    @@ -31,7 +29,10 @@ kotlin { | |
| iosSimulatorArm64() | ||
| 
     | 
||
| @OptIn(ExperimentalWasmDsl::class) | ||
| wasmJs() | ||
| wasmJs { | ||
| browser() | ||
| binaries.executable() | ||
| } | ||
| 
     | 
||
| applyDefaultHierarchyTemplate() | ||
| 
     | 
||
| 
        
          
        
         | 
    @@ -55,29 +56,20 @@ kotlin { | |
| 
     | 
||
| android { | ||
| namespace = "io.github.iamcalledrob.smoothRoundedCornerShape" | ||
| compileSdk = 34 | ||
| compileSdk = 36 | ||
| } | ||
| 
     | 
||
| 
     | 
||
| 
     | 
||
| // --- Signing + Publishing --- | ||
| // | ||
| // Make sure the following are accessible via gradle.properties. | ||
| // If they are missing or invalid, expect cryptic and misleading errors. | ||
| // Ideally in ~/.gradle/gradle.properties so it's not checked in to source control: | ||
| // - signing.gnupg.keyId, | ||
| // - signing.gnupg.password | ||
| // - signing.gnupg.secretKeyRingFile | ||
| // - mavenCentralUsername | ||
| // - mavenCentralPassword | ||
| 
     | 
||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not apply anymore now that the publishing happens via CI/CD  | 
||
| val githubAccount = "iamcalledrob" | ||
| val githubRepository = "smooth-rounded-corner-shape" | ||
| val githubUrl = "https://github.com/$githubAccount/$githubRepository" | ||
| val email = "[email protected]" | ||
| val projectDescription = "SmoothRoundedCornerShape" | ||
| 
     | 
||
| mavenPublishing { | ||
| publishToMavenCentral() | ||
| 
     | 
||
| signAllPublications() | ||
| 
     | 
||
| coordinates(groupId = group.toString(), artifactId = githubRepository, version = version.toString()) | ||
| 
     | 
||
| configure( | ||
| 
          
            
          
           | 
    @@ -110,13 +102,4 @@ mavenPublishing { | |
| developerConnection.set("scm:git:ssh://[email protected]/$githubAccount/$githubRepository.git") | ||
| } | ||
| } | ||
| 
     | 
||
| publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) | ||
| signAllPublications() | ||
| } | ||
| 
     | 
||
| signing { | ||
| println("Signing...") | ||
| useGpgCmd() | ||
| sign(publishing.publications) | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #Thu Sep 05 13:18:42 BST 2024 | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why the plugin is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use compose, it is now mandatory to apply this plugin: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-compiler.html#migrating-a-compose-multiplatform-project